comparison src/lisp.h @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents de805c49cfc1
children e804706bfb8c
comparison
equal deleted inserted replaced
411:12e008d41344 412:697ef44129c6
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 INCLUDED_lisp_h_ 25 #ifndef _XEMACS_LISP_H_
26 #define INCLUDED_lisp_h_ 26 #define _XEMACS_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 #include <stddef.h> /* offsetof */ 42
43 #include <sys/types.h> 43 #ifdef __lucid
44 #include <limits.h> 44 # include <sysent.h>
45 #endif
45 46
46 /* ---- Dynamic arrays ---- */ 47 /* ---- Dynamic arrays ---- */
47 48
48 #define Dynarr_declare(type) \ 49 #define Dynarr_declare(type) \
49 type *base; \ 50 type *base; \
57 Dynarr_declare (void); 58 Dynarr_declare (void);
58 } Dynarr; 59 } Dynarr;
59 60
60 void *Dynarr_newf (int elsize); 61 void *Dynarr_newf (int elsize);
61 void Dynarr_resize (void *dy, int size); 62 void Dynarr_resize (void *dy, int size);
62 void Dynarr_insert_many (void *d, const void *el, int len, int start); 63 void Dynarr_insert_many (void *d, CONST void *el, int len, int start);
63 void Dynarr_delete_many (void *d, int start, int len); 64 void Dynarr_delete_many (void *d, int start, int len);
64 void Dynarr_free (void *d); 65 void Dynarr_free (void *d);
65 66
66 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type))) 67 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof(type)))
67 #define Dynarr_new2(dynarr_type, type) \
68 ((dynarr_type *) Dynarr_newf (sizeof (type)))
69 #define Dynarr_at(d, pos) ((d)->base[pos]) 68 #define Dynarr_at(d, pos) ((d)->base[pos])
70 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos)) 69 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos))
71 #define Dynarr_length(d) ((d)->cur) 70 #define Dynarr_length(d) ((d)->cur)
72 #define Dynarr_largest(d) ((d)->largest) 71 #define Dynarr_largest(d) ((d)->largest)
73 #define Dynarr_reset(d) ((d)->cur = 0) 72 #define Dynarr_reset(d) ((d)->cur = 0)
74 #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur) 73 #define Dynarr_add_many(d, el, len) Dynarr_insert_many (d, el, len, (d)->cur)
75 #define Dynarr_insert_many_at_start(d, el, len) \ 74 #define Dynarr_insert_many_at_start(d, el, len) \
76 Dynarr_insert_many (d, el, len, 0) 75 Dynarr_insert_many (d, el, len, 0)
77 #define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof (s) - 1) 76 #define Dynarr_add_literal_string(d, s) Dynarr_add_many (d, s, sizeof(s) - 1)
78 #define Dynarr_add_lisp_string(d, s) do { \ 77 #define Dynarr_add_lisp_string(d, s) do { \
79 Lisp_String *dyna_ls_s = XSTRING (s); \ 78 struct Lisp_String *dyna_ls_s = XSTRING (s); \
80 Dynarr_add_many (d, (char *) string_data (dyna_ls_s), \ 79 Dynarr_add_many (d, (char *) string_data (dyna_ls_s), \
81 string_length (dyna_ls_s)); \ 80 string_length (dyna_ls_s)); \
82 } while (0) 81 } while (0)
83 82
84 #define Dynarr_add(d, el) ( \ 83 #define Dynarr_add(d, el) ( \
89 /* The following defines will get you into real trouble if you aren't 88 /* The following defines will get you into real trouble if you aren't
90 careful. But they can save a lot of execution time when used wisely. */ 89 careful. But they can save a lot of execution time when used wisely. */
91 #define Dynarr_increment(d) ((d)->cur++) 90 #define Dynarr_increment(d) ((d)->cur++)
92 #define Dynarr_set_size(d, n) ((d)->cur = n) 91 #define Dynarr_set_size(d, n) ((d)->cur = n)
93 92
93 /* Minimum size in elements for dynamic array when resized; default is 32 */
94 extern int Dynarr_min_size;
95
94 #ifdef MEMORY_USAGE_STATS 96 #ifdef MEMORY_USAGE_STATS
95 struct overhead_stats; 97 struct overhead_stats;
96 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats); 98 size_t Dynarr_memory_usage (void *d, struct overhead_stats *stats);
97 #endif 99 #endif
98 100
108 #ifndef max 110 #ifndef max
109 #define max(a,b) (((a) > (b)) ? (a) : (b)) 111 #define max(a,b) (((a) > (b)) ? (a) : (b))
110 #endif 112 #endif
111 113
112 /* Memory allocation */ 114 /* Memory allocation */
113 void malloc_warning (const char *); 115 void malloc_warning (CONST char *);
114 void *xmalloc (size_t size); 116 void *xmalloc (size_t size);
115 void *xmalloc_and_zero (size_t size); 117 void *xmalloc_and_zero (size_t size);
116 void *xrealloc (void *, size_t size); 118 void *xrealloc (void *, size_t size);
117 char *xstrdup (const char *); 119 char *xstrdup (CONST char *);
118 /* generally useful */ 120 /* generally useful */
119 #define countof(x) ((int) (sizeof(x)/sizeof((x)[0]))) 121 #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)))
120 #define xnew(type) ((type *) xmalloc (sizeof (type))) 124 #define xnew(type) ((type *) xmalloc (sizeof (type)))
121 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type))) 125 #define xnew_array(type, len) ((type *) xmalloc ((len) * sizeof (type)))
122 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type))) 126 #define xnew_and_zero(type) ((type *) xmalloc_and_zero (sizeof (type)))
123 #define xzero(lvalue) ((void) memset (&(lvalue), '\0', sizeof (lvalue))) 127 #define xzero(lvalue) ((void) memset (&(lvalue), 0, sizeof (lvalue)))
124 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type))) 128 #define xnew_array_and_zero(type, len) ((type *) xmalloc_and_zero ((len) * sizeof (type)))
125 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type)))) 129 #define XREALLOC_ARRAY(ptr, type, len) ((void) (ptr = (type *) xrealloc (ptr, (len) * sizeof (type))))
126 #define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type))) 130 #define alloca_array(type, len) ((type *) alloca ((len) * sizeof (type)))
127 131
128 /* also generally useful if you want to avoid arbitrary size limits 132 /* also generally useful if you want to avoid arbitrary size limits
130 to a malloced array of TYPE objects (or possibly a NULL pointer, 134 to a malloced array of TYPE objects (or possibly a NULL pointer,
131 if SIZEVAR is 0), with the total size stored in SIZEVAR. This 135 if SIZEVAR is 0), with the total size stored in SIZEVAR. This
132 macro will realloc BASEVAR as necessary so that it can hold at 136 macro will realloc BASEVAR as necessary so that it can hold at
133 least NEEDED_SIZE objects. The reallocing is done by doubling, 137 least NEEDED_SIZE objects. The reallocing is done by doubling,
134 which ensures constant amortized time per element. */ 138 which ensures constant amortized time per element. */
135 #define DO_REALLOC(basevar, sizevar, needed_size, type) do { \ 139 #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! */ \
136 size_t do_realloc_needed_size = (needed_size); \ 144 size_t do_realloc_needed_size = (needed_size); \
137 if ((sizevar) < do_realloc_needed_size) \ 145 size_t do_realloc_newsize = 0; \
138 { \ 146 while ((sizevar) < (do_realloc_needed_size)) { \
139 if ((sizevar) < 32) \ 147 do_realloc_newsize = 2*(sizevar); \
140 (sizevar) = 32; \ 148 if (do_realloc_newsize < 32) \
141 while ((sizevar) < do_realloc_needed_size) \ 149 do_realloc_newsize = 32; \
142 (sizevar) *= 2; \ 150 (sizevar) = do_realloc_newsize; \
143 XREALLOC_ARRAY (basevar, type, (sizevar)); \ 151 } \
144 } \ 152 if (do_realloc_newsize) \
153 XREALLOC_ARRAY (basevar, type, do_realloc_newsize); \
145 } while (0) 154 } while (0)
146 155
147 #ifdef ERROR_CHECK_MALLOC 156 #ifdef ERROR_CHECK_MALLOC
148 void xfree_1 (void *); 157 void xfree_1 (void *);
149 #define xfree(lvalue) do \ 158 #define xfree(lvalue) do \
152 xfree_1 (*xfree_ptr); \ 161 xfree_1 (*xfree_ptr); \
153 *xfree_ptr = (void *) 0xDEADBEEF; \ 162 *xfree_ptr = (void *) 0xDEADBEEF; \
154 } while (0) 163 } while (0)
155 #else 164 #else
156 void xfree (void *); 165 void xfree (void *);
166 #define xfree_1 xfree
157 #endif /* ERROR_CHECK_MALLOC */ 167 #endif /* ERROR_CHECK_MALLOC */
158 168
159 #ifndef PRINTF_ARGS 169 #ifndef PRINTF_ARGS
160 # if defined (__GNUC__) && (__GNUC__ >= 2) 170 # if defined (__GNUC__) && (__GNUC__ >= 2)
161 # define PRINTF_ARGS(string_index,first_to_check) \ 171 # define PRINTF_ARGS(string_index,first_to_check) \
166 #endif 176 #endif
167 177
168 #ifndef DOESNT_RETURN 178 #ifndef DOESNT_RETURN
169 # if defined __GNUC__ 179 # if defined __GNUC__
170 # if ((__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)) 180 # if ((__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5))
171 # define DOESNT_RETURN void 181 # define DOESNT_RETURN void volatile
172 # define DECLARE_DOESNT_RETURN(decl) \ 182 # define DECLARE_DOESNT_RETURN(decl) \
173 extern void decl __attribute__ ((noreturn)) 183 extern void volatile decl __attribute__ ((noreturn))
174 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ 184 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \
175 /* Should be able to state multiple independent __attribute__s, but \ 185 /* Should be able to state multiple independent __attribute__s, but \
176 the losing syntax doesn't work that way, and screws losing cpp */ \ 186 the losing syntax doesn't work that way, and screws losing cpp */ \
177 extern void decl \ 187 extern void volatile decl \
178 __attribute__ ((noreturn, format (printf, str, idx))) 188 __attribute__ ((noreturn, format (printf, str, idx)))
179 # else 189 # else
180 # define DOESNT_RETURN void volatile 190 # define DOESNT_RETURN void volatile
181 # define DECLARE_DOESNT_RETURN(decl) extern void volatile decl 191 # define DECLARE_DOESNT_RETURN(decl) extern void volatile decl
182 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \ 192 # define DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS(decl,str,idx) \
190 # endif /* GNUC */ 200 # endif /* GNUC */
191 #endif 201 #endif
192 202
193 #ifndef ALIGNOF 203 #ifndef ALIGNOF
194 # if defined (__GNUC__) && (__GNUC__ >= 2) 204 # if defined (__GNUC__) && (__GNUC__ >= 2)
195 # define ALIGNOF(x) __alignof__ (x) 205 # define ALIGNOF(x) __alignof (x)
196 # else 206 # else
197 # define ALIGNOF(x) sizeof (x) 207 # define ALIGNOF(x) sizeof (x)
198 # endif 208 # endif
199 #endif 209 #endif
200 210
219 in production binaries. */ 229 in production binaries. */
220 230
221 #ifdef USE_ASSERTIONS 231 #ifdef USE_ASSERTIONS
222 /* Highly dubious kludge */ 232 /* Highly dubious kludge */
223 /* (thanks, Jamie, I feel better now -- ben) */ 233 /* (thanks, Jamie, I feel better now -- ben) */
224 void assert_failed (const char *, int, const char *); 234 DECLARE_DOESNT_RETURN (assert_failed (CONST char *, int, CONST char *));
225 # define abort() (assert_failed (__FILE__, __LINE__, "abort()")) 235 # define abort() (assert_failed (__FILE__, __LINE__, "abort()"))
226 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) 236 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x))
227 #else 237 #else
228 # ifdef DEBUG_XEMACS 238 # ifdef DEBUG_XEMACS
229 # define assert(x) ((x) ? (void) 0 : (void) abort ()) 239 # define assert(x) ((x) ? (void) 0 : (void) abort ())
237 #define register 247 #define register
238 /*#else*/ 248 /*#else*/
239 /*#define REGISTER register*/ 249 /*#define REGISTER register*/
240 /*#endif*/ 250 /*#endif*/
241 251
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 /* Define the fundamental Lisp data structures */
510
511 /* This is the set of Lisp data types */
512
513 enum Lisp_Type
514 {
515 Lisp_Type_Record,
516 Lisp_Type_Int_Even,
517 Lisp_Type_Char,
518 Lisp_Type_Int_Odd
519 };
520
521 #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record)
242 522
243 /* EMACS_INT is the underlying integral type into which a Lisp_Object must fit. 523 /* EMACS_INT is the underlying integral type into which a Lisp_Object must fit.
244 In particular, it must be large enough to contain a pointer. 524 In particular, it must be large enough to contain a pointer.
245 config.h can override this, e.g. to use `long long' for bigger lisp ints. */ 525 config.h can override this, e.g. to use `long long' for bigger lisp ints. */
246 526
264 # define EMACS_UINT unsigned EMACS_INT 544 # define EMACS_UINT unsigned EMACS_INT
265 #endif 545 #endif
266 546
267 #define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR) 547 #define BITS_PER_EMACS_INT (SIZEOF_EMACS_INT * BITS_PER_CHAR)
268 548
269
270 /************************************************************************/
271 /* typedefs */
272 /************************************************************************/
273
274 /* We put typedefs here so that prototype declarations don't choke.
275 Note that we don't actually declare the structures here (except
276 maybe for simple structures like Dynarrs); that keeps them private
277 to the routines that actually use them. */
278
279 /* The data representing the text in a buffer is logically a set
280 of Bufbytes, declared as follows. */
281
282 typedef unsigned char Bufbyte;
283
284 /* The data representing a string in "external" format (simple
285 binary format) is logically a set of Extbytes, declared as follows. */
286
287 typedef unsigned char Extbyte;
288
289 /* To the user, a buffer is made up of characters, declared as follows.
290 In the non-Mule world, characters and Bufbytes are equivalent.
291 In the Mule world, a character requires (typically) 1 to 4
292 Bufbytes for its representation in a buffer. */
293
294 typedef int Emchar;
295
296 /* Different ways of referring to a position in a buffer. We use
297 the typedefs in preference to 'int' to make it clearer what
298 sort of position is being used. See extents.c for a description
299 of the different positions. We put them here instead of in
300 buffer.h (where they rightfully belong) to avoid syntax errors
301 in function prototypes. */
302
303 typedef EMACS_INT Bufpos;
304 typedef EMACS_INT Bytind;
305 typedef EMACS_INT Memind;
306
307 /* Counts of bytes or chars */
308
309 typedef EMACS_INT Bytecount;
310 typedef EMACS_INT Charcount;
311
312 /* Length in bytes of a string in external format */
313 typedef EMACS_INT Extcount;
314
315 typedef struct lstream Lstream;
316
317 typedef unsigned int face_index;
318
319 typedef struct
320 {
321 Dynarr_declare (struct face_cachel);
322 } face_cachel_dynarr;
323
324 typedef unsigned int glyph_index;
325
326 /* This is shared by process.h, events.h and others in future.
327 See events.h for description */
328 typedef unsigned int USID;
329
330 typedef struct
331 {
332 Dynarr_declare (struct glyph_cachel);
333 } glyph_cachel_dynarr;
334
335 struct buffer; /* "buffer.h" */
336 struct console; /* "console.h" */
337 struct device; /* "device.h" */
338 struct extent_fragment;
339 struct extent;
340 typedef struct extent *EXTENT;
341 struct frame; /* "frame.h" */
342 struct window; /* "window.h" */
343 typedef struct Lisp_Event Lisp_Event; /* "events.h" */
344 typedef struct Lisp_Face Lisp_Face; /* "faces.h" */
345 typedef struct Lisp_Process Lisp_Process; /* "procimpl.h" */
346 struct stat; /* <sys/stat.h> */
347 typedef struct Lisp_Color_Instance Lisp_Color_Instance;
348 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
349 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
350 typedef struct Lisp_Gui_Item Lisp_Gui_Item;
351 struct display_line;
352 struct display_glyph_area;
353 struct display_box;
354 struct redisplay_info;
355 struct window_mirror;
356 struct scrollbar_instance;
357 struct font_metric_info;
358 struct face_cachel;
359 struct console_type_entry;
360
361 typedef struct
362 {
363 Dynarr_declare (Bufbyte);
364 } Bufbyte_dynarr;
365
366 typedef struct
367 {
368 Dynarr_declare (Extbyte);
369 } Extbyte_dynarr;
370
371 typedef struct
372 {
373 Dynarr_declare (Emchar);
374 } Emchar_dynarr;
375
376 typedef struct
377 {
378 Dynarr_declare (char);
379 } char_dynarr;
380
381 typedef unsigned char unsigned_char;
382 typedef struct
383 {
384 Dynarr_declare (unsigned char);
385 } unsigned_char_dynarr;
386
387 typedef unsigned long unsigned_long;
388 typedef struct
389 {
390 Dynarr_declare (unsigned long);
391 } unsigned_long_dynarr;
392
393 typedef struct
394 {
395 Dynarr_declare (int);
396 } int_dynarr;
397
398 typedef struct
399 {
400 Dynarr_declare (Bufpos);
401 } Bufpos_dynarr;
402
403 typedef struct
404 {
405 Dynarr_declare (Bytind);
406 } Bytind_dynarr;
407
408 typedef struct
409 {
410 Dynarr_declare (Charcount);
411 } Charcount_dynarr;
412
413 typedef struct
414 {
415 Dynarr_declare (Bytecount);
416 } Bytecount_dynarr;
417
418 typedef struct
419 {
420 Dynarr_declare (struct console_type_entry);
421 } console_type_entry_dynarr;
422
423 enum run_hooks_condition
424 {
425 RUN_HOOKS_TO_COMPLETION,
426 RUN_HOOKS_UNTIL_SUCCESS,
427 RUN_HOOKS_UNTIL_FAILURE
428 };
429
430 #ifdef HAVE_TOOLBARS
431 enum toolbar_pos
432 {
433 TOP_TOOLBAR,
434 BOTTOM_TOOLBAR,
435 LEFT_TOOLBAR,
436 RIGHT_TOOLBAR
437 };
438 #endif
439
440 enum edge_style
441 {
442 EDGE_ETCHED_IN,
443 EDGE_ETCHED_OUT,
444 EDGE_BEVEL_IN,
445 EDGE_BEVEL_OUT
446 };
447
448 #ifndef ERROR_CHECK_TYPECHECK
449
450 typedef enum error_behavior
451 {
452 ERROR_ME,
453 ERROR_ME_NOT,
454 ERROR_ME_WARN
455 } Error_behavior;
456
457 #define ERRB_EQ(a, b) ((a) == (b))
458
459 #else
460
461 /* By defining it like this, we provide strict type-checking
462 for code that lazily uses ints. */
463
464 typedef struct _error_behavior_struct_
465 {
466 int really_unlikely_name_to_have_accidentally_in_a_non_errb_structure;
467 } Error_behavior;
468
469 extern Error_behavior ERROR_ME;
470 extern Error_behavior ERROR_ME_NOT;
471 extern Error_behavior ERROR_ME_WARN;
472
473 #define ERRB_EQ(a, b) \
474 ((a).really_unlikely_name_to_have_accidentally_in_a_non_errb_structure == \
475 (b).really_unlikely_name_to_have_accidentally_in_a_non_errb_structure)
476
477 #endif
478
479 enum munge_me_out_the_door
480 {
481 MUNGE_ME_FUNCTION_KEY,
482 MUNGE_ME_KEY_TRANSLATION
483 };
484
485
486 /************************************************************************/
487 /* Definition of Lisp_Object data type */
488 /************************************************************************/
489
490 /* Define the fundamental Lisp data structures */
491
492 /* This is the set of Lisp data types */
493
494 enum Lisp_Type
495 {
496 Lisp_Type_Record,
497 Lisp_Type_Int_Even,
498 Lisp_Type_Char,
499 Lisp_Type_Int_Odd
500 };
501
502 #define POINTER_TYPE_P(type) ((type) == Lisp_Type_Record)
503
504 /* Overridden by m/next.h */ 549 /* Overridden by m/next.h */
505 #ifndef ASSERT_VALID_POINTER 550 #ifndef ASSERT_VALID_POINTER
506 # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0)) 551 # define ASSERT_VALID_POINTER(pnt) (assert ((((EMACS_UINT) pnt) & 3) == 0))
507 #endif 552 #endif
508 553
511 #define GCBITS 2 556 #define GCBITS 2
512 #define INT_GCBITS 1 557 #define INT_GCBITS 1
513 558
514 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS) 559 #define INT_VALBITS (BITS_PER_EMACS_INT - INT_GCBITS)
515 #define VALBITS (BITS_PER_EMACS_INT - GCBITS) 560 #define VALBITS (BITS_PER_EMACS_INT - GCBITS)
516 #define EMACS_INT_MAX ((EMACS_INT) ((1UL << INT_VALBITS) -1UL)) 561 #define EMACS_INT_MAX ((1UL << INT_VALBITS) -1UL)
517 #define EMACS_INT_MIN (-(EMACS_INT_MAX) - 1)
518 562
519 #ifdef USE_UNION_TYPE 563 #ifdef USE_UNION_TYPE
520 # include "lisp-union.h" 564 # include "lisp-union.h"
521 #else /* !USE_UNION_TYPE */ 565 #else /* !USE_UNION_TYPE */
522 # include "lisp-disunion.h" 566 # include "lisp-disunion.h"
523 #endif /* !USE_UNION_TYPE */ 567 #endif /* !USE_UNION_TYPE */
524 568
525 #define XPNTR(x) ((void *) XPNTRVAL(x)) 569 #define XPNTR(x) ((void *) (XPNTRVAL(x)))
526 570
527 /* WARNING WARNING WARNING. You must ensure on your own that proper 571 /* WARNING WARNING WARNING. You must ensure on your own that proper
528 GC protection is provided for the elements in this array. */ 572 GC protection is provided for the elements in this array. */
529 typedef struct 573 typedef struct
530 { 574 {
532 } Lisp_Object_dynarr; 576 } Lisp_Object_dynarr;
533 577
534 /* Close your eyes now lest you vomit or spontaneously combust ... */ 578 /* Close your eyes now lest you vomit or spontaneously combust ... */
535 579
536 #define HACKEQ_UNSAFE(obj1, obj2) \ 580 #define HACKEQ_UNSAFE(obj1, obj2) \
537 (EQ (obj1, obj2) || (!POINTER_TYPE_P (XTYPE (obj1)) \ 581 (EQ (obj1, obj2) || (!POINTER_TYPE_P (XGCTYPE (obj1)) \
538 && !POINTER_TYPE_P (XTYPE (obj2)) \ 582 && !POINTER_TYPE_P (XGCTYPE (obj2)) \
539 && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2))) 583 && XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2)))
540 584
541 #ifdef DEBUG_XEMACS 585 #ifdef DEBUG_XEMACS
542 extern int debug_issue_ebola_notices; 586 extern int debug_issue_ebola_notices;
543 int eq_with_ebola_notice (Lisp_Object, Lisp_Object); 587 int eq_with_ebola_notice (Lisp_Object, Lisp_Object);
563 symbol-value-forward), that can never be visible to 607 symbol-value-forward), that can never be visible to
564 the Lisp caller and thus can be used in the C code 608 the Lisp caller and thus can be used in the C code
565 to mean "no such value". */ 609 to mean "no such value". */
566 610
567 #define UNBOUNDP(val) EQ (val, Qunbound) 611 #define UNBOUNDP(val) EQ (val, Qunbound)
612 #define GC_UNBOUNDP(val) GC_EQ (val, Qunbound)
568 613
569 /*********** cons ***********/ 614 /*********** cons ***********/
570 615
571 /* In a cons, the markbit of the car is the gc mark bit */ 616 /* In a cons, the markbit of the car is the gc mark bit */
572 617
591 636
592 DECLARE_LRECORD (cons, Lisp_Cons); 637 DECLARE_LRECORD (cons, Lisp_Cons);
593 #define XCONS(x) XRECORD (x, cons, Lisp_Cons) 638 #define XCONS(x) XRECORD (x, cons, Lisp_Cons)
594 #define XSETCONS(x, p) XSETRECORD (x, p, cons) 639 #define XSETCONS(x, p) XSETRECORD (x, p, cons)
595 #define CONSP(x) RECORDP (x, cons) 640 #define CONSP(x) RECORDP (x, cons)
641 #define GC_CONSP(x) GC_RECORDP (x, cons)
596 #define CHECK_CONS(x) CHECK_RECORD (x, cons) 642 #define CHECK_CONS(x) CHECK_RECORD (x, cons)
597 #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons) 643 #define CONCHECK_CONS(x) CONCHECK_RECORD (x, cons)
598 644
599 #define CONS_MARKED_P(c) MARKED_RECORD_HEADER_P(&((c)->lheader)) 645 #define CONS_MARKED_P(c) MARKED_RECORD_HEADER_P(&((c)->lheader))
600 #define MARK_CONS(c) MARK_RECORD_HEADER (&((c)->lheader)) 646 #define MARK_CONS(c) MARK_RECORD_HEADER (&((c)->lheader))
601 647
602 extern Lisp_Object Qnil; 648 extern Lisp_Object Qnil;
603 649
604 #define NILP(x) EQ (x, Qnil) 650 #define NILP(x) EQ (x, Qnil)
651 #define GC_NILP(x) GC_EQ (x, Qnil)
605 #define XCAR(a) (XCONS (a)->car) 652 #define XCAR(a) (XCONS (a)->car)
606 #define XCDR(a) (XCONS (a)->cdr) 653 #define XCDR(a) (XCONS (a)->cdr)
607 #define LISTP(x) (CONSP(x) || NILP(x)) 654 #define LISTP(x) (CONSP(x) || NILP(x))
608 655
609 #define CHECK_LIST(x) do { \ 656 #define CHECK_LIST(x) do { \
659 /* Delete all elements of external list LIST 706 /* Delete all elements of external list LIST
660 satisfying CONDITION, an expression referring to variable ELT */ 707 satisfying CONDITION, an expression referring to variable ELT */
661 #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \ 708 #define EXTERNAL_LIST_LOOP_DELETE_IF(elt, list, condition) do { \
662 Lisp_Object prev_tail_##list = Qnil; \ 709 Lisp_Object prev_tail_##list = Qnil; \
663 Lisp_Object tail_##list; \ 710 Lisp_Object tail_##list; \
664 EMACS_INT len_##list; \ 711 int len_##list; \
665 EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \ 712 EXTERNAL_LIST_LOOP_4 (elt, list, tail_##list, len_##list) \
666 { \ 713 { \
667 if (condition) \ 714 if (condition) \
668 { \ 715 { \
669 if (NILP (prev_tail_##list)) \ 716 if (NILP (prev_tail_##list)) \
716 /* Optimized and safe macros for looping over external lists. */ 763 /* Optimized and safe macros for looping over external lists. */
717 #define CIRCULAR_LIST_SUSPICION_LENGTH 1024 764 #define CIRCULAR_LIST_SUSPICION_LENGTH 1024
718 765
719 #define EXTERNAL_LIST_LOOP_1(list) \ 766 #define EXTERNAL_LIST_LOOP_1(list) \
720 Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \ 767 Lisp_Object ELL1_elt, ELL1_hare, ELL1_tortoise; \
721 EMACS_INT ELL1_len; \ 768 int ELL1_len; \
722 EXTERNAL_LIST_LOOP_6 (ELL1_elt, list, ELL1_len, ELL1_hare, \ 769 EXTERNAL_LIST_LOOP_6(ELL1_elt, list, ELL1_len, ELL1_hare, \
723 ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH) 770 ELL1_tortoise, CIRCULAR_LIST_SUSPICION_LENGTH)
724 771
725 #define EXTERNAL_LIST_LOOP_2(elt, list) \ 772 #define EXTERNAL_LIST_LOOP_2(elt, list) \
726 Lisp_Object hare_##elt, tortoise_##elt; \ 773 Lisp_Object hare_##elt, tortoise_##elt; \
727 EMACS_INT len_##elt; \ 774 int len_##elt; \
728 EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, hare_##elt, \ 775 EXTERNAL_LIST_LOOP_6(elt, list, len_##elt, hare_##elt, \
729 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) 776 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
730 777
731 #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \ 778 #define EXTERNAL_LIST_LOOP_3(elt, list, tail) \
732 Lisp_Object tortoise_##elt; \ 779 Lisp_Object tortoise_##elt; \
733 EMACS_INT len_##elt; \ 780 int len_##elt; \
734 EXTERNAL_LIST_LOOP_6 (elt, list, len_##elt, tail, \ 781 EXTERNAL_LIST_LOOP_6(elt, list, len_##elt, tail, \
735 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) 782 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
736 783
737 #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \ 784 #define EXTERNAL_LIST_LOOP_4(elt, list, tail, len) \
738 Lisp_Object tortoise_##elt; \ 785 Lisp_Object tortoise_##elt; \
739 EXTERNAL_LIST_LOOP_6 (elt, list, len, tail, \ 786 EXTERNAL_LIST_LOOP_6(elt, list, len, tail, \
740 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH) 787 tortoise_##elt, CIRCULAR_LIST_SUSPICION_LENGTH)
741 788
742 789
743 #define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \ 790 #define EXTERNAL_LIST_LOOP_6(elt, list, len, hare, \
744 tortoise, suspicion_length) \ 791 tortoise, suspicion_length) \
745 for (tortoise = hare = list, len = 0; \ 792 for (tortoise = hare = list, len = 0; \
760 ((void) 0))))) 807 ((void) 0)))))
761 808
762 809
763 810
764 /* Optimized and safe macros for looping over external alists. */ 811 /* Optimized and safe macros for looping over external alists. */
765 #define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \ 812 #define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \
766 Lisp_Object hare_##elt, tortoise_##elt; \ 813 Lisp_Object hare_##elt, tortoise_##elt; \
767 EMACS_INT len_##elt; \ 814 int len_##elt; \
768 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ 815 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \
769 len_##elt, hare_##elt, tortoise_##elt, \ 816 len_##elt, hare_##elt, tortoise_##elt, \
770 CIRCULAR_LIST_SUSPICION_LENGTH) 817 CIRCULAR_LIST_SUSPICION_LENGTH)
771 818
772 #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \ 819 #define EXTERNAL_ALIST_LOOP_5(elt, elt_car, elt_cdr, list, tail) \
773 Lisp_Object tortoise_##elt; \ 820 Lisp_Object tortoise_##elt; \
774 EMACS_INT len_##elt; \ 821 int len_##elt; \
775 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ 822 EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, \
776 len_##elt, tail, tortoise_##elt, \ 823 len_##elt, tail, tortoise_##elt, \
777 CIRCULAR_LIST_SUSPICION_LENGTH) \ 824 CIRCULAR_LIST_SUSPICION_LENGTH)
778 825
779 #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \ 826 #define EXTERNAL_ALIST_LOOP_6(elt, elt_car, elt_cdr, list, tail, len) \
780 Lisp_Object tortoise_##elt; \ 827 Lisp_Object tortoise_##elt; \
781 EXTERNAL_ALIST_LOOP_8 (elt, elt_car, elt_cdr, list, \ 828 EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, \
782 len, tail, tortoise_##elt, \ 829 len, tail, tortoise_##elt, \
783 CIRCULAR_LIST_SUSPICION_LENGTH) 830 CIRCULAR_LIST_SUSPICION_LENGTH)
784 831
785 832
786 #define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \ 833 #define EXTERNAL_ALIST_LOOP_8(elt, elt_car, elt_cdr, list, len, hare, \
787 tortoise, suspicion_length) \ 834 tortoise, suspicion_length) \
788 EXTERNAL_LIST_LOOP_6 (elt, list, len, hare, tortoise, suspicion_length) \ 835 EXTERNAL_LIST_LOOP_6(elt, list, len, hare, tortoise, suspicion_length) \
789 if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \ 836 if (CONSP (elt) ? (elt_car = XCAR (elt), elt_cdr = XCDR (elt), 0) :1) \
790 continue; \ 837 continue; \
791 else 838 else
792 839
793 840
794 /* Optimized and safe macros for looping over external property lists. */ 841 /* Optimized and safe macros for looping over external property lists. */
795 #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \ 842 #define EXTERNAL_PROPERTY_LIST_LOOP_3(key, value, list) \
796 Lisp_Object key, value, hare_##key, tortoise_##key; \ 843 Lisp_Object key, value, hare_##key, tortoise_##key; \
797 EMACS_INT len_##key; \ 844 int len_##key; \
798 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, hare_##key, \ 845 EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len_##key, hare_##key,\
799 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) 846 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
800 847
801 #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \ 848 #define EXTERNAL_PROPERTY_LIST_LOOP_4(key, value, list, tail) \
802 Lisp_Object key, value, tail, tortoise_##key; \ 849 Lisp_Object key, value, tail, tortoise_##key; \
803 EMACS_INT len_##key; \ 850 int len_##key; \
804 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len_##key, tail, \ 851 EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len_##key, tail, \
805 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) 852 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
806 853
807 #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \ 854 #define EXTERNAL_PROPERTY_LIST_LOOP_5(key, value, list, tail, len) \
808 Lisp_Object key, value, tail, tortoise_##key; \ 855 Lisp_Object key, value, tail, tortoise_##key; \
809 EMACS_INT len; \ 856 int len; \
810 EXTERNAL_PROPERTY_LIST_LOOP_7 (key, value, list, len, tail, \ 857 EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, tail, \
811 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH) 858 tortoise_##key, CIRCULAR_LIST_SUSPICION_LENGTH)
812 859
813 860
814 #define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \ 861 #define EXTERNAL_PROPERTY_LIST_LOOP_7(key, value, list, len, hare, \
815 tortoise, suspicion_length) \ 862 tortoise, suspicion_length) \
857 (key = XCAR (tail), tail = XCDR (tail), \ 904 (key = XCAR (tail), tail = XCDR (tail), \
858 value = XCAR (tail), tail = XCDR (tail), 1); \ 905 value = XCAR (tail), tail = XCDR (tail), 1); \
859 ) 906 )
860 907
861 /* Return 1 if LIST is properly acyclic and nil-terminated, else 0. */ 908 /* Return 1 if LIST is properly acyclic and nil-terminated, else 0. */
862 INLINE_HEADER int TRUE_LIST_P (Lisp_Object object); 909 INLINE int TRUE_LIST_P (Lisp_Object object);
863 INLINE_HEADER int 910 INLINE int
864 TRUE_LIST_P (Lisp_Object object) 911 TRUE_LIST_P (Lisp_Object object)
865 { 912 {
866 Lisp_Object hare, tortoise; 913 Lisp_Object hare, tortoise;
867 EMACS_INT len; 914 int len;
868 915
869 for (hare = tortoise = object, len = 0; 916 for (hare = tortoise = object, len = 0;
870 CONSP (hare); 917 CONSP (hare);
871 hare = XCDR (hare), len++) 918 hare = XCDR (hare), len++)
872 { 919 {
884 931
885 /* Signal an error if LIST is not properly acyclic and nil-terminated. */ 932 /* Signal an error if LIST is not properly acyclic and nil-terminated. */
886 #define CHECK_TRUE_LIST(list) do { \ 933 #define CHECK_TRUE_LIST(list) do { \
887 Lisp_Object CTL_list = (list); \ 934 Lisp_Object CTL_list = (list); \
888 Lisp_Object CTL_hare, CTL_tortoise; \ 935 Lisp_Object CTL_hare, CTL_tortoise; \
889 EMACS_INT CTL_len; \ 936 int CTL_len; \
890 \ 937 \
891 for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0; \ 938 for (CTL_hare = CTL_tortoise = CTL_list, CTL_len = 0; \
892 CONSP (CTL_hare); \ 939 CONSP (CTL_hare); \
893 CTL_hare = XCDR (CTL_hare), CTL_len++) \ 940 CTL_hare = XCDR (CTL_hare), CTL_len++) \
894 { \ 941 { \
918 965
919 DECLARE_LRECORD (string, Lisp_String); 966 DECLARE_LRECORD (string, Lisp_String);
920 #define XSTRING(x) XRECORD (x, string, Lisp_String) 967 #define XSTRING(x) XRECORD (x, string, Lisp_String)
921 #define XSETSTRING(x, p) XSETRECORD (x, p, string) 968 #define XSETSTRING(x, p) XSETRECORD (x, p, string)
922 #define STRINGP(x) RECORDP (x, string) 969 #define STRINGP(x) RECORDP (x, string)
970 #define GC_STRINGP(x) GC_RECORDP (x, string)
923 #define CHECK_STRING(x) CHECK_RECORD (x, string) 971 #define CHECK_STRING(x) CHECK_RECORD (x, string)
924 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string) 972 #define CONCHECK_STRING(x) CONCHECK_RECORD (x, string)
925 973
926 #ifdef MULE 974 #ifdef MULE
927 975
928 Charcount bytecount_to_charcount (const Bufbyte *ptr, Bytecount len); 976 Charcount bytecount_to_charcount (CONST Bufbyte *ptr, Bytecount len);
929 Bytecount charcount_to_bytecount (const Bufbyte *ptr, Charcount len); 977 Bytecount charcount_to_bytecount (CONST Bufbyte *ptr, Charcount len);
930 978
931 #else /* not MULE */ 979 #else /* not MULE */
932 980
933 # define bytecount_to_charcount(ptr, len) (len) 981 # define bytecount_to_charcount(ptr, len) (len)
934 # define charcount_to_bytecount(ptr, len) (len) 982 # define charcount_to_bytecount(ptr, len) (len)
943 #define string_byte(s, i) ((s)->data[i] + 0) 991 #define string_byte(s, i) ((s)->data[i] + 0)
944 #define XSTRING_BYTE(s, i) string_byte (XSTRING (s), i) 992 #define XSTRING_BYTE(s, i) string_byte (XSTRING (s), i)
945 #define string_byte_addr(s, i) (&((s)->data[i])) 993 #define string_byte_addr(s, i) (&((s)->data[i]))
946 #define set_string_length(s, len) ((void) ((s)->size = (len))) 994 #define set_string_length(s, len) ((void) ((s)->size = (len)))
947 #define set_string_data(s, ptr) ((void) ((s)->data = (ptr))) 995 #define set_string_data(s, ptr) ((void) ((s)->data = (ptr)))
948 #define set_string_byte(s, i, b) ((void) ((s)->data[i] = (b))) 996 #define set_string_byte(s, i, c) ((void) ((s)->data[i] = (c)))
949 997
950 void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta); 998 void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta);
951 999
952 #ifdef MULE 1000 #ifdef MULE
953 1001
954 INLINE_HEADER Charcount string_char_length (Lisp_String *s); 1002 INLINE Charcount string_char_length (Lisp_String *s);
955 INLINE_HEADER Charcount 1003 INLINE Charcount
956 string_char_length (Lisp_String *s) 1004 string_char_length (Lisp_String *s)
957 { 1005 {
958 return bytecount_to_charcount (string_data (s), string_length (s)); 1006 return bytecount_to_charcount (string_data (s), string_length (s));
959 } 1007 }
960 1008
965 #else /* not MULE */ 1013 #else /* not MULE */
966 1014
967 # define string_char_length(s) string_length (s) 1015 # define string_char_length(s) string_length (s)
968 # define string_char(s, i) ((Emchar) string_byte (s, i)) 1016 # define string_char(s, i) ((Emchar) string_byte (s, i))
969 # define string_char_addr(s, i) string_byte_addr (s, i) 1017 # define string_char_addr(s, i) string_byte_addr (s, i)
970 # define set_string_char(s, i, c) set_string_byte (s, i, (Bufbyte)c) 1018 # define set_string_char(s, i, c) set_string_byte (s, i, c)
971 1019
972 #endif /* not MULE */ 1020 #endif /* not MULE */
973
974 /* Return the true size of a struct with a variable-length array field. */
975 #define FLEXIBLE_ARRAY_STRUCT_SIZEOF(flexible_array_structtype, \
976 flexible_array_field, \
977 flexible_array_length) \
978 (offsetof (flexible_array_structtype, flexible_array_field) + \
979 (offsetof (flexible_array_structtype, flexible_array_field[1]) - \
980 offsetof (flexible_array_structtype, flexible_array_field[0])) * \
981 (flexible_array_length))
982 1021
983 /*********** vector ***********/ 1022 /*********** vector ***********/
984 1023
985 struct Lisp_Vector 1024 struct Lisp_Vector
986 { 1025 {
995 1034
996 DECLARE_LRECORD (vector, Lisp_Vector); 1035 DECLARE_LRECORD (vector, Lisp_Vector);
997 #define XVECTOR(x) XRECORD (x, vector, Lisp_Vector) 1036 #define XVECTOR(x) XRECORD (x, vector, Lisp_Vector)
998 #define XSETVECTOR(x, p) XSETRECORD (x, p, vector) 1037 #define XSETVECTOR(x, p) XSETRECORD (x, p, vector)
999 #define VECTORP(x) RECORDP (x, vector) 1038 #define VECTORP(x) RECORDP (x, vector)
1039 #define GC_VECTORP(x) GC_RECORDP (x, vector)
1000 #define CHECK_VECTOR(x) CHECK_RECORD (x, vector) 1040 #define CHECK_VECTOR(x) CHECK_RECORD (x, vector)
1001 #define CONCHECK_VECTOR(x) CONCHECK_RECORD (x, vector) 1041 #define CONCHECK_VECTOR(x) CONCHECK_RECORD (x, vector)
1002 1042
1003 #define vector_length(v) ((v)->size) 1043 #define vector_length(v) ((v)->size)
1004 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s)) 1044 #define XVECTOR_LENGTH(s) vector_length (XVECTOR (s))
1033 1073
1034 DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector); 1074 DECLARE_LRECORD (bit_vector, Lisp_Bit_Vector);
1035 #define XBIT_VECTOR(x) XRECORD (x, bit_vector, Lisp_Bit_Vector) 1075 #define XBIT_VECTOR(x) XRECORD (x, bit_vector, Lisp_Bit_Vector)
1036 #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector) 1076 #define XSETBIT_VECTOR(x, p) XSETRECORD (x, p, bit_vector)
1037 #define BIT_VECTORP(x) RECORDP (x, bit_vector) 1077 #define BIT_VECTORP(x) RECORDP (x, bit_vector)
1078 #define GC_BIT_VECTORP(x) GC_RECORDP (x, bit_vector)
1038 #define CHECK_BIT_VECTOR(x) CHECK_RECORD (x, bit_vector) 1079 #define CHECK_BIT_VECTOR(x) CHECK_RECORD (x, bit_vector)
1039 #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector) 1080 #define CONCHECK_BIT_VECTOR(x) CONCHECK_RECORD (x, bit_vector)
1040 1081
1041 #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1)) 1082 #define BITP(x) (INTP (x) && (XINT (x) == 0 || XINT (x) == 1))
1083 #define GC_BITP(x) (GC_INTP (x) && (XINT (x) == 0 || XINT (x) == 1))
1042 1084
1043 #define CHECK_BIT(x) do { \ 1085 #define CHECK_BIT(x) do { \
1044 if (!BITP (x)) \ 1086 if (!BITP (x)) \
1045 dead_wrong_type_argument (Qbitp, x);\ 1087 dead_wrong_type_argument (Qbitp, x);\
1046 } while (0) 1088 } while (0)
1051 } while (0) 1093 } while (0)
1052 1094
1053 #define bit_vector_length(v) ((v)->size) 1095 #define bit_vector_length(v) ((v)->size)
1054 #define bit_vector_next(v) ((v)->next) 1096 #define bit_vector_next(v) ((v)->next)
1055 1097
1056 INLINE_HEADER int bit_vector_bit (Lisp_Bit_Vector *v, size_t n); 1098 INLINE int bit_vector_bit (Lisp_Bit_Vector *v, int i);
1057 INLINE_HEADER int 1099 INLINE int
1058 bit_vector_bit (Lisp_Bit_Vector *v, size_t n) 1100 bit_vector_bit (Lisp_Bit_Vector *v, int i)
1059 { 1101 {
1060 return ((v->bits[n >> LONGBITS_LOG2] >> (n & (LONGBITS_POWER_OF_2 - 1))) 1102 unsigned int ui = (unsigned int) i;
1103
1104 return (((v)->bits[ui >> LONGBITS_LOG2] >> (ui & (LONGBITS_POWER_OF_2 - 1)))
1061 & 1); 1105 & 1);
1062 } 1106 }
1063 1107
1064 INLINE_HEADER void set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value); 1108 INLINE void set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value);
1065 INLINE_HEADER void 1109 INLINE void
1066 set_bit_vector_bit (Lisp_Bit_Vector *v, size_t n, int value) 1110 set_bit_vector_bit (Lisp_Bit_Vector *v, int i, int value)
1067 { 1111 {
1112 unsigned int ui = (unsigned int) i;
1068 if (value) 1113 if (value)
1069 v->bits[n >> LONGBITS_LOG2] |= (1UL << (n & (LONGBITS_POWER_OF_2 - 1))); 1114 (v)->bits[ui >> LONGBITS_LOG2] |= (1U << (ui & (LONGBITS_POWER_OF_2 - 1)));
1070 else 1115 else
1071 v->bits[n >> LONGBITS_LOG2] &= ~(1UL << (n & (LONGBITS_POWER_OF_2 - 1))); 1116 (v)->bits[ui >> LONGBITS_LOG2] &= ~(1U << (ui & (LONGBITS_POWER_OF_2 - 1)));
1072 } 1117 }
1073 1118
1074 /* Number of longs required to hold LEN bits */ 1119 /* Number of longs required to hold LEN bits */
1075 #define BIT_VECTOR_LONG_STORAGE(len) \ 1120 #define BIT_VECTOR_LONG_STORAGE(len) \
1076 (((len) + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2) 1121 ((len + LONGBITS_POWER_OF_2 - 1) >> LONGBITS_LOG2)
1077 1122
1078 1123
1079 /*********** symbol ***********/ 1124 /*********** symbol ***********/
1080 1125
1081 typedef struct Lisp_Symbol Lisp_Symbol;
1082 struct Lisp_Symbol 1126 struct Lisp_Symbol
1083 { 1127 {
1084 struct lrecord_header lheader; 1128 struct lrecord_header lheader;
1085 /* next symbol in this obarray bucket */ 1129 /* next symbol in this obarray bucket */
1086 Lisp_Symbol *next; 1130 struct Lisp_Symbol *next;
1087 Lisp_String *name; 1131 struct Lisp_String *name;
1088 Lisp_Object value; 1132 Lisp_Object value;
1089 Lisp_Object function; 1133 Lisp_Object function;
1090 Lisp_Object plist; 1134 Lisp_Object plist;
1091 }; 1135 };
1136 typedef struct Lisp_Symbol Lisp_Symbol;
1092 1137
1093 #define SYMBOL_IS_KEYWORD(sym) \ 1138 #define SYMBOL_IS_KEYWORD(sym) \
1094 ((string_byte (symbol_name (XSYMBOL (sym)), 0) == ':') \ 1139 ((string_byte (symbol_name (XSYMBOL (sym)), 0) == ':') \
1095 && EQ (sym, oblookup (Vobarray, \ 1140 && EQ (sym, oblookup (Vobarray, \
1096 string_data (symbol_name (XSYMBOL (sym))), \ 1141 string_data (symbol_name (XSYMBOL (sym))), \
1099 1144
1100 DECLARE_LRECORD (symbol, Lisp_Symbol); 1145 DECLARE_LRECORD (symbol, Lisp_Symbol);
1101 #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol) 1146 #define XSYMBOL(x) XRECORD (x, symbol, Lisp_Symbol)
1102 #define XSETSYMBOL(x, p) XSETRECORD (x, p, symbol) 1147 #define XSETSYMBOL(x, p) XSETRECORD (x, p, symbol)
1103 #define SYMBOLP(x) RECORDP (x, symbol) 1148 #define SYMBOLP(x) RECORDP (x, symbol)
1149 #define GC_SYMBOLP(x) GC_RECORDP (x, symbol)
1104 #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol) 1150 #define CHECK_SYMBOL(x) CHECK_RECORD (x, symbol)
1105 #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol) 1151 #define CONCHECK_SYMBOL(x) CONCHECK_RECORD (x, symbol)
1106 1152
1107 #define symbol_next(s) ((s)->next) 1153 #define symbol_next(s) ((s)->next)
1108 #define symbol_name(s) ((s)->name) 1154 #define symbol_name(s) ((s)->name)
1115 typedef Lisp_Object (*lisp_fn_t) (void); 1161 typedef Lisp_Object (*lisp_fn_t) (void);
1116 1162
1117 struct Lisp_Subr 1163 struct Lisp_Subr
1118 { 1164 {
1119 struct lrecord_header lheader; 1165 struct lrecord_header lheader;
1120 short min_args; 1166 short min_args, max_args;
1121 short max_args; 1167 CONST char *prompt;
1122 const char *prompt; 1168 CONST char *doc;
1123 const char *doc; 1169 CONST char *name;
1124 const char *name;
1125 lisp_fn_t subr_fn; 1170 lisp_fn_t subr_fn;
1126 }; 1171 };
1127 typedef struct Lisp_Subr Lisp_Subr; 1172 typedef struct Lisp_Subr Lisp_Subr;
1128 1173
1129 DECLARE_LRECORD (subr, Lisp_Subr); 1174 DECLARE_LRECORD (subr, Lisp_Subr);
1130 #define XSUBR(x) XRECORD (x, subr, Lisp_Subr) 1175 #define XSUBR(x) XRECORD (x, subr, Lisp_Subr)
1131 #define XSETSUBR(x, p) XSETRECORD (x, p, subr) 1176 #define XSETSUBR(x, p) XSETRECORD (x, p, subr)
1132 #define SUBRP(x) RECORDP (x, subr) 1177 #define SUBRP(x) RECORDP (x, subr)
1178 #define GC_SUBRP(x) GC_RECORDP (x, subr)
1133 #define CHECK_SUBR(x) CHECK_RECORD (x, subr) 1179 #define CHECK_SUBR(x) CHECK_RECORD (x, subr)
1134 #define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr) 1180 #define CONCHECK_SUBR(x) CONCHECK_RECORD (x, subr)
1135 1181
1136 #define subr_function(subr) ((subr)->subr_fn) 1182 #define subr_function(subr) (subr)->subr_fn
1137 #define SUBR_FUNCTION(subr,max_args) \ 1183 #define subr_name(subr) (subr)->name
1138 ((Lisp_Object (*) (EXFUN_##max_args)) (subr)->subr_fn)
1139 #define subr_name(subr) ((subr)->name)
1140 1184
1141 /*********** marker ***********/ 1185 /*********** marker ***********/
1142 1186
1143 typedef struct Lisp_Marker Lisp_Marker;
1144 struct Lisp_Marker 1187 struct Lisp_Marker
1145 { 1188 {
1146 struct lrecord_header lheader; 1189 struct lrecord_header lheader;
1147 Lisp_Marker *next; 1190 struct Lisp_Marker *next, *prev;
1148 Lisp_Marker *prev;
1149 struct buffer *buffer; 1191 struct buffer *buffer;
1150 Memind memind; 1192 Memind memind;
1151 char insertion_type; 1193 char insertion_type;
1152 }; 1194 };
1195 typedef struct Lisp_Marker Lisp_Marker;
1153 1196
1154 DECLARE_LRECORD (marker, Lisp_Marker); 1197 DECLARE_LRECORD (marker, Lisp_Marker);
1155 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker) 1198 #define XMARKER(x) XRECORD (x, marker, Lisp_Marker)
1156 #define XSETMARKER(x, p) XSETRECORD (x, p, marker) 1199 #define XSETMARKER(x, p) XSETRECORD (x, p, marker)
1157 #define MARKERP(x) RECORDP (x, marker) 1200 #define MARKERP(x) RECORDP (x, marker)
1201 #define GC_MARKERP(x) GC_RECORDP (x, marker)
1158 #define CHECK_MARKER(x) CHECK_RECORD (x, marker) 1202 #define CHECK_MARKER(x) CHECK_RECORD (x, marker)
1159 #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker) 1203 #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker)
1160 1204
1161 /* The second check was looking for GCed markers still in use */ 1205 /* The second check was looking for GCed markers still in use */
1162 /* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */ 1206 /* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */
1165 #define marker_prev(m) ((m)->prev) 1209 #define marker_prev(m) ((m)->prev)
1166 1210
1167 /*********** char ***********/ 1211 /*********** char ***********/
1168 1212
1169 #define CHARP(x) (XTYPE (x) == Lisp_Type_Char) 1213 #define CHARP(x) (XTYPE (x) == Lisp_Type_Char)
1214 #define GC_CHARP(x) (XGCTYPE (x) == Lisp_Type_Char)
1170 1215
1171 #ifdef ERROR_CHECK_TYPECHECK 1216 #ifdef ERROR_CHECK_TYPECHECK
1172 1217
1173 INLINE_HEADER Emchar XCHAR (Lisp_Object obj); 1218 INLINE Emchar XCHAR (Lisp_Object obj);
1174 INLINE_HEADER Emchar 1219 INLINE Emchar
1175 XCHAR (Lisp_Object obj) 1220 XCHAR (Lisp_Object obj)
1176 { 1221 {
1177 assert (CHARP (obj)); 1222 assert (CHARP (obj));
1178 return XCHARVAL (obj); 1223 return XCHARVAL (obj);
1179 } 1224 }
1180 1225
1181 #else 1226 #else
1182 1227
1183 #define XCHAR(x) ((Emchar)XCHARVAL (x)) 1228 #define XCHAR(x) XCHARVAL (x)
1184 1229
1185 #endif 1230 #endif
1186 1231
1187 #define CHECK_CHAR(x) CHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp) 1232 #define CHECK_CHAR(x) CHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp)
1188 #define CONCHECK_CHAR(x) CONCHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp) 1233 #define CONCHECK_CHAR(x) CONCHECK_NONRECORD (x, Lisp_Type_Char, Qcharacterp)
1206 1251
1207 DECLARE_LRECORD (float, Lisp_Float); 1252 DECLARE_LRECORD (float, Lisp_Float);
1208 #define XFLOAT(x) XRECORD (x, float, Lisp_Float) 1253 #define XFLOAT(x) XRECORD (x, float, Lisp_Float)
1209 #define XSETFLOAT(x, p) XSETRECORD (x, p, float) 1254 #define XSETFLOAT(x, p) XSETRECORD (x, p, float)
1210 #define FLOATP(x) RECORDP (x, float) 1255 #define FLOATP(x) RECORDP (x, float)
1256 #define GC_FLOATP(x) GC_RECORDP (x, float)
1211 #define CHECK_FLOAT(x) CHECK_RECORD (x, float) 1257 #define CHECK_FLOAT(x) CHECK_RECORD (x, float)
1212 #define CONCHECK_FLOAT(x) CONCHECK_RECORD (x, float) 1258 #define CONCHECK_FLOAT(x) CONCHECK_RECORD (x, float)
1213 1259
1214 #define float_data(f) ((f)->data.d) 1260 #define float_data(f) ((f)->data.d)
1215 #define XFLOAT_DATA(x) float_data (XFLOAT (x)) 1261 #define XFLOAT_DATA(x) float_data (XFLOAT (x))
1225 if (!INT_OR_FLOATP (x)) \ 1271 if (!INT_OR_FLOATP (x)) \
1226 x = wrong_type_argument (Qnumberp, x); \ 1272 x = wrong_type_argument (Qnumberp, x); \
1227 } while (0) 1273 } while (0)
1228 1274
1229 # define INT_OR_FLOATP(x) (INTP (x) || FLOATP (x)) 1275 # define INT_OR_FLOATP(x) (INTP (x) || FLOATP (x))
1276 # define GC_INT_OR_FLOATP(x) (GC_INTP (x) || GC_FLOATP (x))
1230 1277
1231 #else /* not LISP_FLOAT_TYPE */ 1278 #else /* not LISP_FLOAT_TYPE */
1232 1279
1233 #define XFLOAT(x) --- error! No float support. --- 1280 #define XFLOAT(x) --- error! No float support. ---
1234 #define XSETFLOAT(x, p) --- error! No float support. --- 1281 #define XSETFLOAT(x, p) --- error! No float support. ---
1235 #define FLOATP(x) 0 1282 #define FLOATP(x) 0
1283 #define GC_FLOATP(x) 0
1236 #define CHECK_FLOAT(x) --- error! No float support. --- 1284 #define CHECK_FLOAT(x) --- error! No float support. ---
1237 #define CONCHECK_FLOAT(x) --- error! No float support. --- 1285 #define CONCHECK_FLOAT(x) --- error! No float support. ---
1238 1286
1239 #define XFLOATINT(n) XINT(n) 1287 #define XFLOATINT(n) XINT(n)
1240 #define CHECK_INT_OR_FLOAT CHECK_INT 1288 #define CHECK_INT_OR_FLOAT CHECK_INT
1241 #define CONCHECK_INT_OR_FLOAT CONCHECK_INT 1289 #define CONCHECK_INT_OR_FLOAT CONCHECK_INT
1242 #define INT_OR_FLOATP(x) INTP (x) 1290 #define INT_OR_FLOATP(x) (INTP (x))
1291 # define GC_INT_OR_FLOATP(x) (GC_INTP (x))
1243 1292
1244 #endif /* not LISP_FLOAT_TYPE */ 1293 #endif /* not LISP_FLOAT_TYPE */
1245 1294
1246 /*********** int ***********/ 1295 /*********** int ***********/
1247 1296
1297 #define GC_INTP(x) INTP (x)
1298
1248 #define ZEROP(x) EQ (x, Qzero) 1299 #define ZEROP(x) EQ (x, Qzero)
1300 #define GC_ZEROP(x) GC_EQ (x, Qzero)
1249 1301
1250 #ifdef ERROR_CHECK_TYPECHECK 1302 #ifdef ERROR_CHECK_TYPECHECK
1251 1303
1252 INLINE_HEADER EMACS_INT XINT (Lisp_Object obj); 1304 INLINE EMACS_INT XINT (Lisp_Object obj);
1253 INLINE_HEADER EMACS_INT 1305 INLINE EMACS_INT
1254 XINT (Lisp_Object obj) 1306 XINT (Lisp_Object obj)
1255 { 1307 {
1256 assert (INTP (obj)); 1308 assert (INTP (obj));
1257 return XREALINT (obj); 1309 return XREALINT (obj);
1258 } 1310 }
1259 1311
1260 INLINE_HEADER EMACS_INT XCHAR_OR_INT (Lisp_Object obj); 1312 INLINE EMACS_INT XCHAR_OR_INT (Lisp_Object obj);
1261 INLINE_HEADER EMACS_INT 1313 INLINE EMACS_INT
1262 XCHAR_OR_INT (Lisp_Object obj) 1314 XCHAR_OR_INT (Lisp_Object obj)
1263 { 1315 {
1264 assert (INTP (obj) || CHARP (obj)); 1316 assert (INTP (obj) || CHARP (obj));
1265 return CHARP (obj) ? XCHAR (obj) : XINT (obj); 1317 return CHARP (obj) ? XCHAR (obj) : XINT (obj);
1266 } 1318 }
1281 if (!INTP (x)) \ 1333 if (!INTP (x)) \
1282 x = wrong_type_argument (Qintegerp, x); \ 1334 x = wrong_type_argument (Qintegerp, x); \
1283 } while (0) 1335 } while (0)
1284 1336
1285 #define NATNUMP(x) (INTP (x) && XINT (x) >= 0) 1337 #define NATNUMP(x) (INTP (x) && XINT (x) >= 0)
1338 #define GC_NATNUMP(x) (GC_INTP (x) && XINT (x) >= 0)
1286 1339
1287 #define CHECK_NATNUM(x) do { \ 1340 #define CHECK_NATNUM(x) do { \
1288 if (!NATNUMP (x)) \ 1341 if (!NATNUMP (x)) \
1289 dead_wrong_type_argument (Qnatnump, x); \ 1342 dead_wrong_type_argument (Qnatnump, x); \
1290 } while (0) 1343 } while (0)
1324 x = wrong_type_argument (Qinteger_char_or_marker_p, x); \ 1377 x = wrong_type_argument (Qinteger_char_or_marker_p, x); \
1325 } while (0) 1378 } while (0)
1326 1379
1327 1380
1328 /*********** readonly objects ***********/ 1381 /*********** readonly objects ***********/
1329 1382
1330 #define CHECK_C_WRITEABLE(obj) \ 1383 #define CHECK_C_WRITEABLE(obj) \
1331 do { if (c_readonly (obj)) c_write_error (obj); } while (0) 1384 do { if (c_readonly (obj)) c_write_error (obj); } while (0)
1332 1385
1333 #define CHECK_LISP_WRITEABLE(obj) \ 1386 #define CHECK_LISP_WRITEABLE(obj) \
1334 do { if (lisp_readonly (obj)) lisp_write_error (obj); } while (0) 1387 do { if (lisp_readonly (obj)) lisp_write_error (obj); } while (0)
1387 cdr is unmarked. */ 1440 cdr is unmarked. */
1388 WEAK_LIST_ASSOC, 1441 WEAK_LIST_ASSOC,
1389 /* element disappears if it's a cons and its car is unmarked. */ 1442 /* element disappears if it's a cons and its car is unmarked. */
1390 WEAK_LIST_KEY_ASSOC, 1443 WEAK_LIST_KEY_ASSOC,
1391 /* element disappears if it's a cons and its cdr is unmarked. */ 1444 /* element disappears if it's a cons and its cdr is unmarked. */
1392 WEAK_LIST_VALUE_ASSOC, 1445 WEAK_LIST_VALUE_ASSOC
1393 /* element disappears if it's a cons and neither its car nor
1394 its cdr is marked. */
1395 WEAK_LIST_FULL_ASSOC
1396 }; 1446 };
1397 1447
1398 struct weak_list 1448 struct weak_list
1399 { 1449 {
1400 struct lcrecord_header header; 1450 struct lcrecord_header header;
1405 1455
1406 DECLARE_LRECORD (weak_list, struct weak_list); 1456 DECLARE_LRECORD (weak_list, struct weak_list);
1407 #define XWEAK_LIST(x) XRECORD (x, weak_list, struct weak_list) 1457 #define XWEAK_LIST(x) XRECORD (x, weak_list, struct weak_list)
1408 #define XSETWEAK_LIST(x, p) XSETRECORD (x, p, weak_list) 1458 #define XSETWEAK_LIST(x, p) XSETRECORD (x, p, weak_list)
1409 #define WEAK_LISTP(x) RECORDP (x, weak_list) 1459 #define WEAK_LISTP(x) RECORDP (x, weak_list)
1460 #define GC_WEAK_LISTP(x) GC_RECORDP (x, weak_list)
1410 #define CHECK_WEAK_LIST(x) CHECK_RECORD (x, weak_list) 1461 #define CHECK_WEAK_LIST(x) CHECK_RECORD (x, weak_list)
1411 #define CONCHECK_WEAK_LIST(x) CONCHECK_RECORD (x, weak_list) 1462 #define CONCHECK_WEAK_LIST(x) CONCHECK_RECORD (x, weak_list)
1412 1463
1413 #define weak_list_list(w) ((w)->list) 1464 #define weak_list_list(w) ((w)->list)
1414 #define XWEAK_LIST_LIST(w) (XWEAK_LIST (w)->list) 1465 #define XWEAK_LIST_LIST(w) (XWEAK_LIST (w)->list)
1415 1466
1416 Lisp_Object make_weak_list (enum weak_list_type type); 1467 Lisp_Object make_weak_list (enum weak_list_type type);
1417 /* The following two are only called by the garbage collector */ 1468 /* The following two are only called by the garbage collector */
1418 int finish_marking_weak_lists (void); 1469 int finish_marking_weak_lists (int (*obj_marked_p) (Lisp_Object),
1419 void prune_weak_lists (void); 1470 void (*markobj) (Lisp_Object));
1471 void prune_weak_lists (int (*obj_marked_p) (Lisp_Object));
1420 1472
1421 /*********** lcrecord lists ***********/ 1473 /*********** lcrecord lists ***********/
1422 1474
1423 struct lcrecord_list 1475 struct lcrecord_list
1424 { 1476 {
1425 struct lcrecord_header header; 1477 struct lcrecord_header header;
1426 Lisp_Object free; 1478 Lisp_Object free;
1427 size_t size; 1479 size_t size;
1428 const struct lrecord_implementation *implementation; 1480 CONST struct lrecord_implementation *implementation;
1429 }; 1481 };
1430 1482
1431 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list); 1483 DECLARE_LRECORD (lcrecord_list, struct lcrecord_list);
1432 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list) 1484 #define XLCRECORD_LIST(x) XRECORD (x, lcrecord_list, struct lcrecord_list)
1433 #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list) 1485 #define XSETLCRECORD_LIST(x, p) XSETRECORD (x, p, lcrecord_list)
1434 #define LCRECORD_LISTP(x) RECORDP (x, lcrecord_list) 1486 #define LCRECORD_LISTP(x) RECORDP (x, lcrecord_list)
1487 #define GC_LCRECORD_LISTP(x) GC_RECORDP (x, lcrecord_list)
1435 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list) 1488 /* #define CHECK_LCRECORD_LIST(x) CHECK_RECORD (x, lcrecord_list)
1436 Lcrecord lists should never escape to the Lisp level, so 1489 Lcrecord lists should never escape to the Lisp level, so
1437 functions should not be doing this. */ 1490 functions should not be doing this. */
1438 1491
1439 Lisp_Object make_lcrecord_list (size_t size, 1492 Lisp_Object make_lcrecord_list (size_t size,
1440 const struct lrecord_implementation 1493 CONST struct lrecord_implementation
1441 *implementation); 1494 *implementation);
1442 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list); 1495 Lisp_Object allocate_managed_lcrecord (Lisp_Object lcrecord_list);
1443 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord); 1496 void free_managed_lcrecord (Lisp_Object lcrecord_list, Lisp_Object lcrecord);
1444 1497
1445 1498
1494 #define UNEVALLED -1 1547 #define UNEVALLED -1
1495 1548
1496 /* Can't be const, because then subr->doc is read-only and 1549 /* Can't be const, because then subr->doc is read-only and
1497 Snarf_documentation chokes */ 1550 Snarf_documentation chokes */
1498 1551
1552 #define subr_lheader_initializer { 0, { 0, 0, 0 } }
1553
1499 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ 1554 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \
1500 Lisp_Object Fname (EXFUN_##max_args); \ 1555 Lisp_Object Fname (EXFUN_##max_args); \
1501 static struct Lisp_Subr S##Fname = \ 1556 static struct Lisp_Subr S##Fname = { subr_lheader_initializer, \
1502 { \ 1557 min_args, max_args, prompt, 0, lname, (lisp_fn_t) Fname }; \
1503 { /* struct lrecord_header */ \
1504 lrecord_type_subr, /* lrecord_type_index */ \
1505 1, /* mark bit */ \
1506 1, /* c_readonly bit */ \
1507 1 /* lisp_readonly bit */ \
1508 }, \
1509 min_args, \
1510 max_args, \
1511 prompt, \
1512 0, /* doc string */ \
1513 lname, \
1514 (lisp_fn_t) Fname \
1515 }; \
1516 Lisp_Object Fname (DEFUN_##max_args arglist) 1558 Lisp_Object Fname (DEFUN_##max_args arglist)
1517 1559
1518 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a 1560 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a
1519 prototype that matches max_args, and add the obligatory 1561 prototype that matches max_args, and add the obligatory
1520 `Lisp_Object' type declaration to the formal C arguments. */ 1562 `Lisp_Object' type declaration to the formal C arguments. */
1547 specpdl_depth is the current depth of `specpdl'. 1589 specpdl_depth is the current depth of `specpdl'.
1548 Save this for use later as arg to `unbind_to'. */ 1590 Save this for use later as arg to `unbind_to'. */
1549 extern int specpdl_depth_counter; 1591 extern int specpdl_depth_counter;
1550 #define specpdl_depth() specpdl_depth_counter 1592 #define specpdl_depth() specpdl_depth_counter
1551 1593
1552
1553 #define CHECK_FUNCTION(fun) do { \
1554 while (NILP (Ffunctionp (fun))) \
1555 signal_invalid_function_error (fun); \
1556 } while (0)
1557
1558 1594
1559 /************************************************************************/ 1595 /************************************************************************/
1560 /* Checking for QUIT */ 1596 /* Checking for QUIT */
1561 /************************************************************************/ 1597 /************************************************************************/
1562 1598
1614 #define HASH7(a,b,c,d,e,f,g) (GOOD_HASH * HASH6 (a,b,c,d,e,f) + (g)) 1650 #define HASH7(a,b,c,d,e,f,g) (GOOD_HASH * HASH6 (a,b,c,d,e,f) + (g))
1615 #define HASH8(a,b,c,d,e,f,g,h) (GOOD_HASH * HASH7 (a,b,c,d,e,f,g) + (h)) 1651 #define HASH8(a,b,c,d,e,f,g,h) (GOOD_HASH * HASH7 (a,b,c,d,e,f,g) + (h))
1616 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i)) 1652 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i))
1617 1653
1618 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj)) 1654 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj))
1619 unsigned long string_hash (const char *xv); 1655 unsigned long string_hash (CONST void *xv);
1620 unsigned long memory_hash (const void *xv, size_t size); 1656 unsigned long memory_hash (CONST void *xv, size_t size);
1621 unsigned long internal_hash (Lisp_Object obj, int depth); 1657 unsigned long internal_hash (Lisp_Object obj, int depth);
1622 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth); 1658 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth);
1623 1659
1624 1660
1625 /************************************************************************/ 1661 /************************************************************************/
1628 1664
1629 #ifdef I18N3 1665 #ifdef I18N3
1630 #ifdef HAVE_LIBINTL_H 1666 #ifdef HAVE_LIBINTL_H
1631 #include <libintl.h> 1667 #include <libintl.h>
1632 #else 1668 #else
1633 char *dgettext (const char *, const char *); 1669 char *dgettext (CONST char *, CONST char *);
1634 char *gettext (const char *); 1670 char *gettext (CONST char *);
1635 char *textdomain (const char *); 1671 char *textdomain (CONST char *);
1636 char *bindtextdomain (const char *, const char *); 1672 char *bindtextdomain (CONST char *, CONST char *);
1637 #endif /* HAVE_LIBINTL_H */ 1673 #endif /* HAVE_LIBINTL_H */
1638 1674
1639 #define GETTEXT(x) gettext(x) 1675 #define GETTEXT(x) gettext(x)
1640 #define LISP_GETTEXT(x) Fgettext (x) 1676 #define LISP_GETTEXT(x) Fgettext (x)
1641 #else /* !I18N3 */ 1677 #else /* !I18N3 */
1773 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \ 1809 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \
1774 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \ 1810 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \
1775 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \ 1811 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \
1776 gcprolist = &gcpro4 )) 1812 gcprolist = &gcpro4 ))
1777 1813
1778 #define GCPRO5(var1, var2, var3, var4, var5) ((void) ( \ 1814 #define GCPRO5(var1, var2, var3, var4, var5) \
1815 ((void) ( \
1779 gcpro1.next = gcprolist, gcpro1.var = &var1, gcpro1.nvars = 1, \ 1816 gcpro1.next = gcprolist, gcpro1.var = &var1, gcpro1.nvars = 1, \
1780 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \ 1817 gcpro2.next = &gcpro1, gcpro2.var = &var2, gcpro2.nvars = 1, \
1781 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \ 1818 gcpro3.next = &gcpro2, gcpro3.var = &var3, gcpro3.nvars = 1, \
1782 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \ 1819 gcpro4.next = &gcpro3, gcpro4.var = &var4, gcpro4.nvars = 1, \
1783 gcpro5.next = &gcpro4, gcpro5.var = &var5, gcpro5.nvars = 1, \ 1820 gcpro5.next = &gcpro4, gcpro5.var = &var5, gcpro5.nvars = 1, \
1805 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \ 1842 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \
1806 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \ 1843 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \
1807 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \ 1844 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \
1808 gcprolist = &ngcpro4 )) 1845 gcprolist = &ngcpro4 ))
1809 1846
1810 #define NGCPRO5(var1, var2, var3, var4, var5) ((void) ( \ 1847 #define NGCPRO5(var1, var2, var3, var4, var5) \
1848 ((void) ( \
1811 ngcpro1.next = gcprolist, ngcpro1.var = &var1, ngcpro1.nvars = 1, \ 1849 ngcpro1.next = gcprolist, ngcpro1.var = &var1, ngcpro1.nvars = 1, \
1812 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \ 1850 ngcpro2.next = &ngcpro1, ngcpro2.var = &var2, ngcpro2.nvars = 1, \
1813 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \ 1851 ngcpro3.next = &ngcpro2, ngcpro3.var = &var3, ngcpro3.nvars = 1, \
1814 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \ 1852 ngcpro4.next = &ngcpro3, ngcpro4.var = &var4, ngcpro4.nvars = 1, \
1815 ngcpro5.next = &ngcpro4, ngcpro5.var = &var5, ngcpro5.nvars = 1, \ 1853 ngcpro5.next = &ngcpro4, ngcpro5.var = &var5, ngcpro5.nvars = 1, \
1837 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \ 1875 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \
1838 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \ 1876 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \
1839 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \ 1877 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \
1840 gcprolist = &nngcpro4 )) 1878 gcprolist = &nngcpro4 ))
1841 1879
1842 #define NNGCPRO5(var1, var2, var3, var4, var5) ((void) ( \ 1880 #define NNGCPRO5(var1, var2, var3, var4, var5) \
1881 ((void) ( \
1843 nngcpro1.next = gcprolist, nngcpro1.var = &var1, nngcpro1.nvars = 1, \ 1882 nngcpro1.next = gcprolist, nngcpro1.var = &var1, nngcpro1.nvars = 1, \
1844 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \ 1883 nngcpro2.next = &nngcpro1, nngcpro2.var = &var2, nngcpro2.nvars = 1, \
1845 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \ 1884 nngcpro3.next = &nngcpro2, nngcpro3.var = &var3, nngcpro3.nvars = 1, \
1846 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \ 1885 nngcpro4.next = &nngcpro3, nngcpro4.var = &var4, nngcpro4.nvars = 1, \
1847 nngcpro5.next = &nngcpro4, nngcpro5.var = &var5, nngcpro5.nvars = 1, \ 1886 nngcpro5.next = &nngcpro4, nngcpro5.var = &var5, nngcpro5.nvars = 1, \
1898 RETURN_SANS_WARNINGS ret_nunb_val; \ 1937 RETURN_SANS_WARNINGS ret_nunb_val; \
1899 } while (0) 1938 } while (0)
1900 1939
1901 /* Call staticpro (&var) to protect static variable `var'. */ 1940 /* Call staticpro (&var) to protect static variable `var'. */
1902 void staticpro (Lisp_Object *); 1941 void staticpro (Lisp_Object *);
1903
1904 /* Call staticpro_nodump (&var) to protect static variable `var'. */
1905 /* var will not be saved at dump time */
1906 void staticpro_nodump (Lisp_Object *);
1907
1908 /* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */
1909 void dumpstruct (void *, const struct struct_description *);
1910
1911 /* Call dumpopaque(&var, size) to dump the opaque static structure `var'. */
1912 void dumpopaque (void *, size_t);
1913
1914 /* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */
1915 void pdump_wire (Lisp_Object *);
1916
1917 /* Call pdump_wire(&var) to ensure that var is properly updated after
1918 pdump. var must point to a linked list of objects out of which
1919 some may not be dumped */
1920 void pdump_wire_list (Lisp_Object *);
1921 1942
1922 /* Nonzero means Emacs has already been initialized. 1943 /* Nonzero means Emacs has already been initialized.
1923 Used during startup to detect startup of dumped Emacs. */ 1944 Used during startup to detect startup of dumped Emacs. */
1924 extern int initialized; 1945 extern int initialized;
1925 1946
1966 #else 1987 #else
1967 #define IS_DEVICE_SEP(c) ((c) == DEVICE_SEP) 1988 #define IS_DEVICE_SEP(c) ((c) == DEVICE_SEP)
1968 #endif 1989 #endif
1969 #endif 1990 #endif
1970 #ifndef IS_ANY_SEP 1991 #ifndef IS_ANY_SEP
1971 #define IS_ANY_SEP(c) IS_DIRECTORY_SEP (c) 1992 #define IS_ANY_SEP(c) (IS_DIRECTORY_SEP (c))
1972 #endif 1993 #endif
1973 1994
1974 #ifdef HAVE_INTTYPES_H 1995 #ifdef HAVE_INTTYPES_H
1975 #include <inttypes.h> 1996 #include <inttypes.h>
1976 #elif SIZEOF_VOID_P == SIZEOF_INT 1997 #elif SIZEOF_VOID_P == SIZEOF_INT
2015 extern int gc_currently_forbidden; 2036 extern int gc_currently_forbidden;
2016 Lisp_Object restore_gc_inhibit (Lisp_Object); 2037 Lisp_Object restore_gc_inhibit (Lisp_Object);
2017 extern EMACS_INT gc_generation_number[1]; 2038 extern EMACS_INT gc_generation_number[1];
2018 int c_readonly (Lisp_Object); 2039 int c_readonly (Lisp_Object);
2019 int lisp_readonly (Lisp_Object); 2040 int lisp_readonly (Lisp_Object);
2020 Lisp_Object build_string (const char *); 2041 Lisp_Object build_string (CONST char *);
2021 Lisp_Object build_ext_string (const char *, Lisp_Object); 2042 Lisp_Object build_ext_string (CONST char *, enum external_data_format);
2022 Lisp_Object build_translated_string (const char *); 2043 Lisp_Object build_translated_string (CONST char *);
2023 Lisp_Object make_string (const Bufbyte *, Bytecount); 2044 Lisp_Object make_string (CONST Bufbyte *, Bytecount);
2024 Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object); 2045 Lisp_Object make_ext_string (CONST Extbyte *, EMACS_INT,
2046 enum external_data_format);
2025 Lisp_Object make_uninit_string (Bytecount); 2047 Lisp_Object make_uninit_string (Bytecount);
2026 Lisp_Object make_float (double); 2048 Lisp_Object make_float (double);
2027 Lisp_Object make_string_nocopy (const Bufbyte *, Bytecount); 2049 Lisp_Object make_string_nocopy (CONST Bufbyte *, Bytecount);
2028 void free_cons (Lisp_Cons *); 2050 void free_cons (Lisp_Cons *);
2029 void free_list (Lisp_Object); 2051 void free_list (Lisp_Object);
2030 void free_alist (Lisp_Object); 2052 void free_alist (Lisp_Object);
2031 void mark_conses_in_list (Lisp_Object); 2053 void mark_conses_in_list (Lisp_Object);
2032 void free_marker (Lisp_Marker *); 2054 void free_marker (Lisp_Marker *);
2033 int object_dead_p (Lisp_Object); 2055 int object_dead_p (Lisp_Object);
2034 void mark_object (Lisp_Object obj);
2035 int marked_p (Lisp_Object obj);
2036 2056
2037 #ifdef MEMORY_USAGE_STATS 2057 #ifdef MEMORY_USAGE_STATS
2038 size_t malloced_storage_size (void *, size_t, struct overhead_stats *); 2058 size_t malloced_storage_size (void *, size_t, struct overhead_stats *);
2039 size_t fixed_type_block_overhead (size_t); 2059 size_t fixed_type_block_overhead (size_t);
2040 #endif
2041 #ifdef PDUMP
2042 void pdump (void);
2043 int pdump_load (const char *);
2044
2045 extern char *pdump_start, *pdump_end;
2046 #define DUMPEDP(adr) ((((char *)(adr)) < pdump_end) && (((char *)(adr)) >= pdump_start))
2047 #else
2048 #define DUMPEDP(adr) 0
2049 #endif 2060 #endif
2050 2061
2051 /* Defined in buffer.c */ 2062 /* Defined in buffer.c */
2052 Lisp_Object make_buffer (struct buffer *); 2063 Lisp_Object make_buffer (struct buffer *);
2053 Lisp_Object get_truename_buffer (Lisp_Object); 2064 Lisp_Object get_truename_buffer (Lisp_Object);
2054 void switch_to_buffer (Lisp_Object, Lisp_Object); 2065 void switch_to_buffer (Lisp_Object, Lisp_Object);
2055 extern int find_file_compare_truenames; 2066 extern int find_file_compare_truenames;
2056 extern int find_file_use_truenames; 2067 extern int find_file_use_truenames;
2057 2068
2058 /* Defined in callproc.c */ 2069 /* Defined in callproc.c */
2059 char *egetenv (const char *); 2070 char *egetenv (CONST char *);
2060 2071
2061 /* Defined in console.c */ 2072 /* Defined in console.c */
2062 void stuff_buffered_input (Lisp_Object); 2073 void stuff_buffered_input (Lisp_Object);
2063
2064 /* Defined in console-msw.c */
2065 EXFUN (Fmswindows_message_box, 3);
2066 extern int mswindows_message_outputted;
2067 2074
2068 /* Defined in data.c */ 2075 /* Defined in data.c */
2069 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object)); 2076 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object));
2070 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object)); 2077 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object));
2071 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object)); 2078 DECLARE_DOESNT_RETURN (args_out_of_range (Lisp_Object, Lisp_Object));
2072 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object, 2079 DECLARE_DOESNT_RETURN (args_out_of_range_3 (Lisp_Object, Lisp_Object,
2073 Lisp_Object)); 2080 Lisp_Object));
2074 Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); 2081 Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object);
2075 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object)); 2082 DECLARE_DOESNT_RETURN (dead_wrong_type_argument (Lisp_Object, Lisp_Object));
2076 void check_int_range (EMACS_INT, EMACS_INT, EMACS_INT); 2083 void check_int_range (int, int, int);
2077 2084
2078 enum arith_comparison { 2085 enum arith_comparison {
2079 arith_equal, 2086 arith_equal,
2080 arith_notequal, 2087 arith_notequal,
2081 arith_less, 2088 arith_less,
2086 2093
2087 Lisp_Object word_to_lisp (unsigned int); 2094 Lisp_Object word_to_lisp (unsigned int);
2088 unsigned int lisp_to_word (Lisp_Object); 2095 unsigned int lisp_to_word (Lisp_Object);
2089 2096
2090 /* Defined in dired.c */ 2097 /* Defined in dired.c */
2091 Lisp_Object make_directory_hash_table (const char *); 2098 Lisp_Object make_directory_hash_table (CONST char *);
2092 Lisp_Object wasteful_word_to_lisp (unsigned int); 2099 Lisp_Object wasteful_word_to_lisp (unsigned int);
2093 2100
2094 /* Defined in doc.c */ 2101 /* Defined in doc.c */
2095 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object); 2102 Lisp_Object unparesseuxify_doc_string (int, EMACS_INT, char *, Lisp_Object);
2096 Lisp_Object read_doc_string (Lisp_Object); 2103 Lisp_Object read_doc_string (Lisp_Object);
2097 2104
2098 /* Defined in doprnt.c */ 2105 /* Defined in doprnt.c */
2099 Bytecount emacs_doprnt_c (Lisp_Object, const Bufbyte *, Lisp_Object, 2106 Bytecount emacs_doprnt_c (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2100 Bytecount, ...); 2107 Bytecount, ...);
2101 Bytecount emacs_doprnt_va (Lisp_Object, const Bufbyte *, Lisp_Object, 2108 Bytecount emacs_doprnt_va (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2102 Bytecount, va_list); 2109 Bytecount, va_list);
2103 Bytecount emacs_doprnt_lisp (Lisp_Object, const Bufbyte *, Lisp_Object, 2110 Bytecount emacs_doprnt_lisp (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2104 Bytecount, int, const Lisp_Object *); 2111 Bytecount, int, CONST Lisp_Object *);
2105 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, const Bufbyte *, Lisp_Object, 2112 Bytecount emacs_doprnt_lisp_2 (Lisp_Object, CONST Bufbyte *, Lisp_Object,
2106 Bytecount, int, ...); 2113 Bytecount, int, ...);
2107 Lisp_Object emacs_doprnt_string_c (const Bufbyte *, Lisp_Object, 2114 Lisp_Object emacs_doprnt_string_c (CONST Bufbyte *, Lisp_Object,
2108 Bytecount, ...); 2115 Bytecount, ...);
2109 Lisp_Object emacs_doprnt_string_va (const Bufbyte *, Lisp_Object, 2116 Lisp_Object emacs_doprnt_string_va (CONST Bufbyte *, Lisp_Object,
2110 Bytecount, va_list); 2117 Bytecount, va_list);
2111 Lisp_Object emacs_doprnt_string_lisp (const Bufbyte *, Lisp_Object, 2118 Lisp_Object emacs_doprnt_string_lisp (CONST Bufbyte *, Lisp_Object,
2112 Bytecount, int, const Lisp_Object *); 2119 Bytecount, int, CONST Lisp_Object *);
2113 Lisp_Object emacs_doprnt_string_lisp_2 (const Bufbyte *, Lisp_Object, 2120 Lisp_Object emacs_doprnt_string_lisp_2 (CONST Bufbyte *, Lisp_Object,
2114 Bytecount, int, ...); 2121 Bytecount, int, ...);
2115 2122
2116 /* Defined in editfns.c */ 2123 /* Defined in editfns.c */
2117 void uncache_home_directory (void); 2124 void uncache_home_directory (void);
2118 Extbyte *get_home_directory (void); 2125 char *get_home_directory (void);
2119 char *user_login_name (uid_t *); 2126 char *user_login_name (int *);
2120 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos); 2127 Bufpos bufpos_clip_to_bounds (Bufpos, Bufpos, Bufpos);
2121 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind); 2128 Bytind bytind_clip_to_bounds (Bytind, Bytind, Bytind);
2122 void buffer_insert1 (struct buffer *, Lisp_Object); 2129 void buffer_insert1 (struct buffer *, Lisp_Object);
2123 Lisp_Object make_string_from_buffer (struct buffer *, Bufpos, Charcount); 2130 Lisp_Object make_string_from_buffer (struct buffer *, int, int);
2124 Lisp_Object make_string_from_buffer_no_extents (struct buffer *, Bufpos, Charcount); 2131 Lisp_Object make_string_from_buffer_no_extents (struct buffer *, int, int);
2125 Lisp_Object save_excursion_save (void); 2132 Lisp_Object save_excursion_save (void);
2126 Lisp_Object save_restriction_save (void); 2133 Lisp_Object save_restriction_save (void);
2127 Lisp_Object save_excursion_restore (Lisp_Object); 2134 Lisp_Object save_excursion_restore (Lisp_Object);
2128 Lisp_Object save_restriction_restore (Lisp_Object); 2135 Lisp_Object save_restriction_restore (Lisp_Object);
2129 2136
2130 /* Defined in emacsfns.c */ 2137 /* Defined in emacsfns.c */
2131 Lisp_Object save_current_buffer_restore (Lisp_Object); 2138 Lisp_Object save_current_buffer_restore (Lisp_Object);
2132 2139
2133 /* Defined in emacs.c */ 2140 /* Defined in emacs.c */
2134 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (const char *, 2141 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (fatal (CONST char *,
2135 ...), 1, 2); 2142 ...), 1, 2);
2136 int stderr_out (const char *, ...) PRINTF_ARGS (1, 2); 2143 int stderr_out (CONST char *, ...) PRINTF_ARGS (1, 2);
2137 int stdout_out (const char *, ...) PRINTF_ARGS (1, 2); 2144 int stdout_out (CONST char *, ...) PRINTF_ARGS (1, 2);
2138 SIGTYPE fatal_error_signal (int); 2145 SIGTYPE fatal_error_signal (int);
2139 Lisp_Object make_arg_list (int, char **); 2146 Lisp_Object make_arg_list (int, char **);
2140 void make_argc_argv (Lisp_Object, int *, char ***); 2147 void make_argc_argv (Lisp_Object, int *, char ***);
2141 void free_argc_argv (char **); 2148 void free_argc_argv (char **);
2142 Lisp_Object decode_env_path (const char *, const char *); 2149 Lisp_Object decode_env_path (CONST char *, CONST char *);
2143 Lisp_Object decode_path (const char *); 2150 Lisp_Object decode_path (CONST char *);
2144 /* Nonzero means don't do interactive redisplay and don't change tty modes */ 2151 /* Nonzero means don't do interactive redisplay and don't change tty modes */
2145 extern int noninteractive, noninteractive1; 2152 extern int noninteractive;
2146 extern int fatal_error_in_progress;
2147 extern int preparing_for_armageddon; 2153 extern int preparing_for_armageddon;
2148 extern int emacs_priority; 2154 extern int emacs_priority;
2149 extern int running_asynch_code; 2155 extern int running_asynch_code;
2150 extern int suppress_early_error_handler_backtrace; 2156 extern int suppress_early_error_handler_backtrace;
2151 2157
2152 /* Defined in eval.c */ 2158 /* Defined in eval.c */
2153 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object)); 2159 DECLARE_DOESNT_RETURN (signal_error (Lisp_Object, Lisp_Object));
2154 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior); 2160 void maybe_signal_error (Lisp_Object, Lisp_Object, Lisp_Object, Error_behavior);
2155 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object, 2161 Lisp_Object maybe_signal_continuable_error (Lisp_Object, Lisp_Object,
2156 Lisp_Object, Error_behavior); 2162 Lisp_Object, Error_behavior);
2157 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (const char *, 2163 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error (CONST char *,
2158 ...), 1, 2); 2164 ...), 1, 2);
2159 void maybe_error (Lisp_Object, Error_behavior, const char *, 2165 void maybe_error (Lisp_Object, Error_behavior, CONST char *,
2160 ...) PRINTF_ARGS (3, 4); 2166 ...) PRINTF_ARGS (3, 4);
2161 Lisp_Object continuable_error (const char *, ...) PRINTF_ARGS (1, 2); 2167 Lisp_Object continuable_error (CONST char *, ...) PRINTF_ARGS (1, 2);
2162 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior, 2168 Lisp_Object maybe_continuable_error (Lisp_Object, Error_behavior,
2163 const char *, ...) PRINTF_ARGS (3, 4); 2169 CONST char *, ...) PRINTF_ARGS (3, 4);
2164 DECLARE_DOESNT_RETURN (signal_simple_error (const char *, Lisp_Object)); 2170 DECLARE_DOESNT_RETURN (signal_simple_error (CONST char *, Lisp_Object));
2165 void maybe_signal_simple_error (const char *, Lisp_Object, 2171 void maybe_signal_simple_error (CONST char *, Lisp_Object,
2166 Lisp_Object, Error_behavior); 2172 Lisp_Object, Error_behavior);
2167 Lisp_Object signal_simple_continuable_error (const char *, Lisp_Object); 2173 Lisp_Object signal_simple_continuable_error (CONST char *, Lisp_Object);
2168 Lisp_Object maybe_signal_simple_continuable_error (const char *, Lisp_Object, 2174 Lisp_Object maybe_signal_simple_continuable_error (CONST char *, Lisp_Object,
2169 Lisp_Object, Error_behavior); 2175 Lisp_Object, Error_behavior);
2170 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob 2176 DECLARE_DOESNT_RETURN_GCC_ATTRIBUTE_SYNTAX_SUCKS (error_with_frob
2171 (Lisp_Object, const char *, 2177 (Lisp_Object, CONST char *,
2172 ...), 2, 3); 2178 ...), 2, 3);
2173 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior, 2179 void maybe_error_with_frob (Lisp_Object, Lisp_Object, Error_behavior,
2174 const char *, ...) PRINTF_ARGS (4, 5); 2180 CONST char *, ...) PRINTF_ARGS (4, 5);
2175 Lisp_Object continuable_error_with_frob (Lisp_Object, const char *, 2181 Lisp_Object continuable_error_with_frob (Lisp_Object, CONST char *,
2176 ...) PRINTF_ARGS (2, 3); 2182 ...) PRINTF_ARGS (2, 3);
2177 Lisp_Object maybe_continuable_error_with_frob 2183 Lisp_Object maybe_continuable_error_with_frob
2178 (Lisp_Object, Lisp_Object, Error_behavior, const char *, ...) PRINTF_ARGS (4, 5); 2184 (Lisp_Object, Lisp_Object, Error_behavior, CONST char *, ...) PRINTF_ARGS (4, 5);
2179 DECLARE_DOESNT_RETURN (signal_simple_error_2 (const char *, 2185 DECLARE_DOESNT_RETURN (signal_simple_error_2 (CONST char *,
2180 Lisp_Object, Lisp_Object)); 2186 Lisp_Object, Lisp_Object));
2181 void maybe_signal_simple_error_2 (const char *, Lisp_Object, Lisp_Object, 2187 void maybe_signal_simple_error_2 (CONST char *, Lisp_Object, Lisp_Object,
2182 Lisp_Object, Error_behavior); 2188 Lisp_Object, Error_behavior);
2183 Lisp_Object signal_simple_continuable_error_2 (const char *, 2189 Lisp_Object signal_simple_continuable_error_2 (CONST char *,
2184 Lisp_Object, Lisp_Object); 2190 Lisp_Object, Lisp_Object);
2185 Lisp_Object maybe_signal_simple_continuable_error_2 (const char *, Lisp_Object, 2191 Lisp_Object maybe_signal_simple_continuable_error_2 (CONST char *, Lisp_Object,
2186 Lisp_Object, Lisp_Object, 2192 Lisp_Object, Lisp_Object,
2187 Error_behavior); 2193 Error_behavior);
2188 DECLARE_DOESNT_RETURN (signal_malformed_list_error (Lisp_Object)); 2194 void signal_malformed_list_error (Lisp_Object);
2189 DECLARE_DOESNT_RETURN (signal_malformed_property_list_error (Lisp_Object)); 2195 void signal_malformed_property_list_error (Lisp_Object);
2190 DECLARE_DOESNT_RETURN (signal_circular_list_error (Lisp_Object)); 2196 void signal_circular_list_error (Lisp_Object);
2191 DECLARE_DOESNT_RETURN (signal_circular_property_list_error (Lisp_Object)); 2197 void signal_circular_property_list_error (Lisp_Object);
2192 2198 void signal_void_function_error (Lisp_Object);
2193 Lisp_Object signal_void_function_error (Lisp_Object);
2194 Lisp_Object signal_invalid_function_error (Lisp_Object);
2195 Lisp_Object signal_wrong_number_of_arguments_error (Lisp_Object, int);
2196
2197 Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *, 2199 Lisp_Object run_hook_with_args_in_buffer (struct buffer *, int, Lisp_Object *,
2198 enum run_hooks_condition); 2200 enum run_hooks_condition);
2199 Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition); 2201 Lisp_Object run_hook_with_args (int, Lisp_Object *, enum run_hooks_condition);
2200 void va_run_hook_with_args (Lisp_Object, int, ...); 2202 void va_run_hook_with_args (Lisp_Object, int, ...);
2201 void va_run_hook_with_args_in_buffer (struct buffer *, Lisp_Object, int, ...); 2203 void va_run_hook_with_args_in_buffer (struct buffer *, Lisp_Object, int, ...);
2231 Lisp_Object, Lisp_Object, Lisp_Object, 2233 Lisp_Object, Lisp_Object, Lisp_Object,
2232 Lisp_Object, Lisp_Object); 2234 Lisp_Object, Lisp_Object);
2233 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object); 2235 Lisp_Object eval_in_buffer (struct buffer *, Lisp_Object);
2234 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object); 2236 Lisp_Object call0_with_handler (Lisp_Object, Lisp_Object);
2235 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object); 2237 Lisp_Object call1_with_handler (Lisp_Object, Lisp_Object, Lisp_Object);
2236 Lisp_Object eval_in_buffer_trapping_errors (const char *, struct buffer *, 2238 Lisp_Object eval_in_buffer_trapping_errors (CONST char *, struct buffer *,
2237 Lisp_Object); 2239 Lisp_Object);
2238 Lisp_Object run_hook_trapping_errors (const char *, Lisp_Object); 2240 Lisp_Object run_hook_trapping_errors (CONST char *, Lisp_Object);
2239 Lisp_Object safe_run_hook_trapping_errors (const char *, Lisp_Object, int); 2241 Lisp_Object safe_run_hook_trapping_errors (CONST char *, Lisp_Object, int);
2240 Lisp_Object call0_trapping_errors (const char *, Lisp_Object); 2242 Lisp_Object call0_trapping_errors (CONST char *, Lisp_Object);
2241 Lisp_Object call1_trapping_errors (const char *, Lisp_Object, Lisp_Object); 2243 Lisp_Object call1_trapping_errors (CONST char *, Lisp_Object, Lisp_Object);
2242 Lisp_Object call2_trapping_errors (const char *, 2244 Lisp_Object call2_trapping_errors (CONST char *,
2243 Lisp_Object, Lisp_Object, Lisp_Object); 2245 Lisp_Object, Lisp_Object, Lisp_Object);
2244 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object, 2246 Lisp_Object call_with_suspended_errors (lisp_fn_t, volatile Lisp_Object, Lisp_Object,
2245 Error_behavior, int, ...); 2247 Error_behavior, int, ...);
2246 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */ 2248 /* C Code should be using internal_catch, record_unwind_p, condition_case_1 */
2247 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object), 2249 Lisp_Object internal_catch (Lisp_Object, Lisp_Object (*) (Lisp_Object),
2256 void specbind (Lisp_Object, Lisp_Object); 2258 void specbind (Lisp_Object, Lisp_Object);
2257 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); 2259 void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object);
2258 void do_autoload (Lisp_Object, Lisp_Object); 2260 void do_autoload (Lisp_Object, Lisp_Object);
2259 Lisp_Object un_autoload (Lisp_Object); 2261 Lisp_Object un_autoload (Lisp_Object);
2260 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object); 2262 void warn_when_safe_lispobj (Lisp_Object, Lisp_Object, Lisp_Object);
2261 void warn_when_safe (Lisp_Object, Lisp_Object, const char *, 2263 void warn_when_safe (Lisp_Object, Lisp_Object, CONST char *,
2262 ...) PRINTF_ARGS (3, 4); 2264 ...) PRINTF_ARGS (3, 4);
2263 2265
2264 2266
2265 /* Defined in event-stream.c */ 2267 /* Defined in event-stream.c */
2266 void wait_delaying_user_input (int (*) (void *), void *); 2268 void wait_delaying_user_input (int (*) (void *), void *);
2267 int detect_input_pending (void); 2269 int detect_input_pending (void);
2268 void reset_this_command_keys (Lisp_Object, int); 2270 void reset_this_command_keys (Lisp_Object, int);
2269 Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object); 2271 Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
2270 Lisp_Object enqueue_misc_user_event_pos (Lisp_Object, Lisp_Object, 2272 Lisp_Object enqueue_misc_user_event_pos (Lisp_Object, Lisp_Object,
2271 Lisp_Object, int, int, int, int); 2273 Lisp_Object, int, int, int, int);
2272 extern int modifier_keys_are_sticky;
2273 2274
2274 /* Defined in event-Xt.c */ 2275 /* Defined in event-Xt.c */
2275 void enqueue_Xt_dispatch_event (Lisp_Object event);
2276 void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object); 2276 void signal_special_Xt_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
2277 2277
2278 2278
2279 /* Defined in events.c */ 2279 /* Defined in events.c */
2280 void clear_event_resource (void); 2280 void clear_event_resource (void);
2281 Lisp_Object allocate_event (void); 2281 Lisp_Object allocate_event (void);
2282 int event_to_character (Lisp_Event *, int, int, int);
2282 2283
2283 /* Defined in fileio.c */ 2284 /* Defined in fileio.c */
2284 void record_auto_save (void); 2285 void record_auto_save (void);
2285 void force_auto_save_soon (void); 2286 void force_auto_save_soon (void);
2286 DECLARE_DOESNT_RETURN (report_file_error (const char *, Lisp_Object)); 2287 DECLARE_DOESNT_RETURN (report_file_error (CONST char *, Lisp_Object));
2287 void maybe_report_file_error (const char *, Lisp_Object, 2288 void maybe_report_file_error (CONST char *, Lisp_Object,
2288 Lisp_Object, Error_behavior); 2289 Lisp_Object, Error_behavior);
2289 DECLARE_DOESNT_RETURN (signal_file_error (const char *, Lisp_Object)); 2290 DECLARE_DOESNT_RETURN (signal_file_error (CONST char *, Lisp_Object));
2290 void maybe_signal_file_error (const char *, Lisp_Object, 2291 void maybe_signal_file_error (CONST char *, Lisp_Object,
2291 Lisp_Object, Error_behavior); 2292 Lisp_Object, Error_behavior);
2292 DECLARE_DOESNT_RETURN (signal_double_file_error (const char *, const char *, 2293 DECLARE_DOESNT_RETURN (signal_double_file_error (CONST char *, CONST char *,
2293 Lisp_Object)); 2294 Lisp_Object));
2294 void maybe_signal_double_file_error (const char *, const char *, 2295 void maybe_signal_double_file_error (CONST char *, CONST char *,
2295 Lisp_Object, Lisp_Object, Error_behavior); 2296 Lisp_Object, Lisp_Object, Error_behavior);
2296 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (const char *, const char *, 2297 DECLARE_DOESNT_RETURN (signal_double_file_error_2 (CONST char *, CONST char *,
2297 Lisp_Object, Lisp_Object)); 2298 Lisp_Object, Lisp_Object));
2298 void maybe_signal_double_file_error_2 (const char *, const char *, 2299 void maybe_signal_double_file_error_2 (CONST char *, CONST char *,
2299 Lisp_Object, Lisp_Object, Lisp_Object, 2300 Lisp_Object, Lisp_Object, Lisp_Object,
2300 Error_behavior); 2301 Error_behavior);
2301 Lisp_Object lisp_strerror (int); 2302 Lisp_Object lisp_strerror (int);
2302 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object); 2303 Lisp_Object expand_and_dir_to_file (Lisp_Object, Lisp_Object);
2303 ssize_t read_allowing_quit (int, void *, size_t); 2304 int read_allowing_quit (int, void *, size_t);
2304 ssize_t write_allowing_quit (int, const void *, size_t); 2305 int write_allowing_quit (int, CONST void *, size_t);
2305 int internal_delete_file (Lisp_Object); 2306 int internal_delete_file (Lisp_Object);
2306 2307
2307 /* Defined in filelock.c */ 2308 /* Defined in filelock.c */
2308 void lock_file (Lisp_Object); 2309 void lock_file (Lisp_Object);
2309 void unlock_file (Lisp_Object); 2310 void unlock_file (Lisp_Object);
2330 Lisp_Object delq_no_quit_and_free_cons (Lisp_Object, Lisp_Object); 2331 Lisp_Object delq_no_quit_and_free_cons (Lisp_Object, Lisp_Object);
2331 Lisp_Object remassoc_no_quit (Lisp_Object, Lisp_Object); 2332 Lisp_Object remassoc_no_quit (Lisp_Object, Lisp_Object);
2332 Lisp_Object remassq_no_quit (Lisp_Object, Lisp_Object); 2333 Lisp_Object remassq_no_quit (Lisp_Object, Lisp_Object);
2333 Lisp_Object remrassq_no_quit (Lisp_Object, Lisp_Object); 2334 Lisp_Object remrassq_no_quit (Lisp_Object, Lisp_Object);
2334 2335
2336 void pure_put (Lisp_Object, Lisp_Object, Lisp_Object);
2335 int plists_differ (Lisp_Object, Lisp_Object, int, int, int); 2337 int plists_differ (Lisp_Object, Lisp_Object, int, int, int);
2336 Lisp_Object internal_plist_get (Lisp_Object, Lisp_Object); 2338 Lisp_Object internal_plist_get (Lisp_Object, Lisp_Object);
2337 void internal_plist_put (Lisp_Object *, Lisp_Object, Lisp_Object); 2339 void internal_plist_put (Lisp_Object *, Lisp_Object, Lisp_Object);
2338 int internal_remprop (Lisp_Object *, Lisp_Object); 2340 int internal_remprop (Lisp_Object *, Lisp_Object);
2339 Lisp_Object external_plist_get (Lisp_Object *, Lisp_Object, 2341 Lisp_Object external_plist_get (Lisp_Object *, Lisp_Object,
2346 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object); 2348 Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object);
2347 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object); 2349 Lisp_Object vconcat2 (Lisp_Object, Lisp_Object);
2348 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object); 2350 Lisp_Object vconcat3 (Lisp_Object, Lisp_Object, Lisp_Object);
2349 Lisp_Object nconc2 (Lisp_Object, Lisp_Object); 2351 Lisp_Object nconc2 (Lisp_Object, Lisp_Object);
2350 Lisp_Object bytecode_nconc2 (Lisp_Object *); 2352 Lisp_Object bytecode_nconc2 (Lisp_Object *);
2351 void check_losing_bytecode (const char *, Lisp_Object); 2353 void check_losing_bytecode (CONST char *, Lisp_Object);
2352 2354
2353 /* Defined in getloadavg.c */ 2355 /* Defined in getloadavg.c */
2354 int getloadavg (double[], int); 2356 int getloadavg (double[], int);
2355 2357
2356 /* Defined in glyphs.c */ 2358 /* Defined in glyphs.c */
2358 Lisp_Object encode_error_behavior_flag (Error_behavior); 2360 Lisp_Object encode_error_behavior_flag (Error_behavior);
2359 2361
2360 /* Defined in indent.c */ 2362 /* Defined in indent.c */
2361 int bi_spaces_at_point (struct buffer *, Bytind); 2363 int bi_spaces_at_point (struct buffer *, Bytind);
2362 int column_at_point (struct buffer *, Bufpos, int); 2364 int column_at_point (struct buffer *, Bufpos, int);
2363 int string_column_at_point (Lisp_String *, Bufpos, int);
2364 int current_column (struct buffer *); 2365 int current_column (struct buffer *);
2365 void invalidate_current_column (void); 2366 void invalidate_current_column (void);
2366 Bufpos vmotion (struct window *, Bufpos, int, int *); 2367 Bufpos vmotion (struct window *, Bufpos, int, int *);
2367 Bufpos vmotion_pixels (Lisp_Object, Bufpos, int, int, int *); 2368 Bufpos vmotion_pixels (Lisp_Object, Bufpos, int, int, int *);
2368 2369
2372 /* Defined in lread.c */ 2373 /* Defined in lread.c */
2373 void ebolify_bytecode_constants (Lisp_Object); 2374 void ebolify_bytecode_constants (Lisp_Object);
2374 void close_load_descs (void); 2375 void close_load_descs (void);
2375 int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int); 2376 int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int);
2376 EXFUN (Flocate_file_clear_hashing, 1); 2377 EXFUN (Flocate_file_clear_hashing, 1);
2377 int isfloat_string (const char *); 2378 int isfloat_string (CONST char *);
2378 2379
2379 /* Well, I've decided to enable this. -- ben */ 2380 /* Well, I've decided to enable this. -- ben */
2380 /* And I've decided to make it work right. -- sb */ 2381 /* And I've decided to make it work right. -- sb */
2381 #define LOADHIST 2382 #define LOADHIST
2382 /* Define the following symbol to enable load history of dumped files */ 2383 /* Define the following symbol to enable load history of dumped files */
2409 extern int menubar_show_keybindings; 2410 extern int menubar_show_keybindings;
2410 extern int popup_menu_titles; 2411 extern int popup_menu_titles;
2411 2412
2412 /* Defined in minibuf.c */ 2413 /* Defined in minibuf.c */
2413 extern int minibuf_level; 2414 extern int minibuf_level;
2414 Charcount scmp_1 (const Bufbyte *, const Bufbyte *, Charcount, int); 2415 Charcount scmp_1 (CONST Bufbyte *, CONST Bufbyte *, Charcount, int);
2415 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case) 2416 #define scmp(s1, s2, len) scmp_1 (s1, s2, len, completion_ignore_case)
2416 extern int completion_ignore_case; 2417 extern int completion_ignore_case;
2417 int regexp_ignore_completion_p (const Bufbyte *, Lisp_Object, 2418 int regexp_ignore_completion_p (CONST Bufbyte *, Lisp_Object,
2418 Bytecount, Bytecount); 2419 Bytecount, Bytecount);
2419 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int); 2420 Lisp_Object clear_echo_area (struct frame *, Lisp_Object, int);
2420 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int); 2421 Lisp_Object clear_echo_area_from_print (struct frame *, Lisp_Object, int);
2421 void echo_area_append (struct frame *, const Bufbyte *, Lisp_Object, 2422 void echo_area_append (struct frame *, CONST Bufbyte *, Lisp_Object,
2422 Bytecount, Bytecount, Lisp_Object); 2423 Bytecount, Bytecount, Lisp_Object);
2423 void echo_area_message (struct frame *, const Bufbyte *, Lisp_Object, 2424 void echo_area_message (struct frame *, CONST Bufbyte *, Lisp_Object,
2424 Bytecount, Bytecount, Lisp_Object); 2425 Bytecount, Bytecount, Lisp_Object);
2425 Lisp_Object echo_area_status (struct frame *); 2426 Lisp_Object echo_area_status (struct frame *);
2426 int echo_area_active (struct frame *); 2427 int echo_area_active (struct frame *);
2427 Lisp_Object echo_area_contents (struct frame *); 2428 Lisp_Object echo_area_contents (struct frame *);
2428 void message_internal (const Bufbyte *, Lisp_Object, Bytecount, Bytecount); 2429 void message_internal (CONST Bufbyte *, Lisp_Object, Bytecount, Bytecount);
2429 void message_append_internal (const Bufbyte *, Lisp_Object, 2430 void message_append_internal (CONST Bufbyte *, Lisp_Object,
2430 Bytecount, Bytecount); 2431 Bytecount, Bytecount);
2431 void message (const char *, ...) PRINTF_ARGS (1, 2); 2432 void message (CONST char *, ...) PRINTF_ARGS (1, 2);
2432 void message_append (const char *, ...) PRINTF_ARGS (1, 2); 2433 void message_append (CONST char *, ...) PRINTF_ARGS (1, 2);
2433 void message_no_translate (const char *, ...) PRINTF_ARGS (1, 2); 2434 void message_no_translate (CONST char *, ...) PRINTF_ARGS (1, 2);
2434 void clear_message (void); 2435 void clear_message (void);
2435 2436
2436 /* Defined in print.c */ 2437 /* Defined in print.c */
2437 void write_string_to_stdio_stream (FILE *, struct console *, 2438 void write_string_to_stdio_stream (FILE *, struct console *,
2438 const Bufbyte *, Bytecount, Bytecount, 2439 CONST Bufbyte *, Bytecount, Bytecount,
2439 Lisp_Object, int); 2440 enum external_data_format);
2440 void debug_print (Lisp_Object); 2441 void debug_print (Lisp_Object);
2441 void debug_short_backtrace (int); 2442 void debug_short_backtrace (int);
2442 void temp_output_buffer_setup (Lisp_Object); 2443 void temp_output_buffer_setup (Lisp_Object);
2443 void temp_output_buffer_show (Lisp_Object, Lisp_Object); 2444 void temp_output_buffer_show (Lisp_Object, Lisp_Object);
2444 /* NOTE: Do not call this with the data of a Lisp_String. Use princ. 2445 /* NOTE: Do not call this with the data of a Lisp_String. Use princ.
2445 * Note: stream should be defaulted before calling 2446 * Note: stream should be defaulted before calling
2446 * (eg Qnil means stdout, not Vstandard_output, etc) */ 2447 * (eg Qnil means stdout, not Vstandard_output, etc) */
2447 void write_c_string (const char *, Lisp_Object); 2448 void write_c_string (CONST char *, Lisp_Object);
2448 /* Same goes for this function. */ 2449 /* Same goes for this function. */
2449 void write_string_1 (const Bufbyte *, Bytecount, Lisp_Object); 2450 void write_string_1 (CONST Bufbyte *, Bytecount, Lisp_Object);
2450 void print_cons (Lisp_Object, Lisp_Object, int); 2451 void print_cons (Lisp_Object, Lisp_Object, int);
2451 void print_vector (Lisp_Object, Lisp_Object, int); 2452 void print_vector (Lisp_Object, Lisp_Object, int);
2452 void print_string (Lisp_Object, Lisp_Object, int); 2453 void print_string (Lisp_Object, Lisp_Object, int);
2453 void long_to_string (char *, long); 2454 void long_to_string (char *, long);
2454 void print_internal (Lisp_Object, Lisp_Object, int); 2455 void print_internal (Lisp_Object, Lisp_Object, int);
2461 Lisp_Object, Lisp_Object); 2462 Lisp_Object, Lisp_Object);
2462 void float_to_string (char *, double); 2463 void float_to_string (char *, double);
2463 void internal_object_printer (Lisp_Object, Lisp_Object, int); 2464 void internal_object_printer (Lisp_Object, Lisp_Object, int);
2464 2465
2465 /* Defined in profile.c */ 2466 /* Defined in profile.c */
2466 void mark_profiling_info (void); 2467 void mark_profiling_info (void (*) (Lisp_Object));
2467 void profile_increase_call_count (Lisp_Object); 2468 void profile_increase_call_count (Lisp_Object);
2468 extern int profiling_active; 2469 extern int profiling_active;
2469 extern int profiling_redisplay_flag; 2470 extern int profiling_redisplay_flag;
2470 2471
2471 /* Defined in rangetab.c */ 2472 /* Defined in rangetab.c */
2483 struct re_registers; 2484 struct re_registers;
2484 Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, EMACS_INT, EMACS_INT *, int); 2485 Bufpos scan_buffer (struct buffer *, Emchar, Bufpos, Bufpos, EMACS_INT, EMACS_INT *, int);
2485 Bufpos find_next_newline (struct buffer *, Bufpos, int); 2486 Bufpos find_next_newline (struct buffer *, Bufpos, int);
2486 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int); 2487 Bufpos find_next_newline_no_quit (struct buffer *, Bufpos, int);
2487 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int); 2488 Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int);
2488 Bytind bi_find_next_emchar_in_string (Lisp_String*, Emchar, Bytind, EMACS_INT);
2489 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int); 2489 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int);
2490 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *, 2490 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *,
2491 char *, int, Error_behavior); 2491 char *, int, Error_behavior);
2492 Bytecount fast_string_match (Lisp_Object, const Bufbyte *, 2492 Bytecount fast_string_match (Lisp_Object, CONST Bufbyte *,
2493 Lisp_Object, Bytecount, 2493 Lisp_Object, Bytecount,
2494 Bytecount, int, Error_behavior, int); 2494 Bytecount, int, Error_behavior, int);
2495 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object); 2495 Bytecount fast_lisp_string_match (Lisp_Object, Lisp_Object);
2496 void restore_match_data (void); 2496 void restore_match_data (void);
2497 2497
2509 Error_behavior, int, int, Lisp_Object); 2509 Error_behavior, int, int, Lisp_Object);
2510 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object, 2510 Lisp_Object specifier_instance_no_quit (Lisp_Object, Lisp_Object, Lisp_Object,
2511 Error_behavior, int, Lisp_Object); 2511 Error_behavior, int, Lisp_Object);
2512 2512
2513 /* Defined in symbols.c */ 2513 /* Defined in symbols.c */
2514 int hash_string (const Bufbyte *, Bytecount); 2514 int hash_string (CONST Bufbyte *, Bytecount);
2515 Lisp_Object intern (const char *); 2515 Lisp_Object intern (CONST char *);
2516 Lisp_Object oblookup (Lisp_Object, const Bufbyte *, Bytecount); 2516 Lisp_Object oblookup (Lisp_Object, CONST Bufbyte *, Bytecount);
2517 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *); 2517 void map_obarray (Lisp_Object, int (*) (Lisp_Object, void *), void *);
2518 Lisp_Object indirect_function (Lisp_Object, int); 2518 Lisp_Object indirect_function (Lisp_Object, int);
2519 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object); 2519 Lisp_Object symbol_value_in_buffer (Lisp_Object, Lisp_Object);
2520 void kill_buffer_local_variables (struct buffer *); 2520 void kill_buffer_local_variables (struct buffer *);
2521 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *); 2521 int symbol_value_buffer_local_info (Lisp_Object, struct buffer *);
2525 void reject_constant_symbols (Lisp_Object sym, Lisp_Object newval, 2525 void reject_constant_symbols (Lisp_Object sym, Lisp_Object newval,
2526 int function_p, 2526 int function_p,
2527 Lisp_Object follow_past_lisp_magic); 2527 Lisp_Object follow_past_lisp_magic);
2528 2528
2529 /* Defined in syntax.c */ 2529 /* Defined in syntax.c */
2530 Bufpos scan_words (struct buffer *, Bufpos, int); 2530 int scan_words (struct buffer *, int, int);
2531 2531
2532 /* Defined in undo.c */ 2532 /* Defined in undo.c */
2533 Lisp_Object truncate_undo_list (Lisp_Object, int, int); 2533 Lisp_Object truncate_undo_list (Lisp_Object, int, int);
2534 void record_extent (Lisp_Object, int); 2534 void record_extent (Lisp_Object, int);
2535 void record_insert (struct buffer *, Bufpos, Charcount); 2535 void record_insert (struct buffer *, Bufpos, Charcount);
2541 #ifdef RUN_TIME_REMAP 2541 #ifdef RUN_TIME_REMAP
2542 int run_time_remap (char *); 2542 int run_time_remap (char *);
2543 #endif 2543 #endif
2544 2544
2545 /* Defined in vm-limit.c */ 2545 /* Defined in vm-limit.c */
2546 void memory_warnings (void *, void (*) (const char *)); 2546 void memory_warnings (void *, void (*) (CONST char *));
2547 2547
2548 /* Defined in window.c */ 2548 /* Defined in window.c */
2549 Lisp_Object save_window_excursion_unwind (Lisp_Object); 2549 Lisp_Object save_window_excursion_unwind (Lisp_Object);
2550 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object); 2550 Lisp_Object display_buffer (Lisp_Object, Lisp_Object, Lisp_Object);
2551 2551
2577 EXFUN (Fcar_safe, 1); 2577 EXFUN (Fcar_safe, 1);
2578 EXFUN (Fcdr, 1); 2578 EXFUN (Fcdr, 1);
2579 EXFUN (Fchar_after, 2); 2579 EXFUN (Fchar_after, 2);
2580 EXFUN (Fchar_to_string, 1); 2580 EXFUN (Fchar_to_string, 1);
2581 EXFUN (Fcheck_valid_plist, 1); 2581 EXFUN (Fcheck_valid_plist, 1);
2582 EXFUN (Fvalid_plist_p, 1);
2583 EXFUN (Fclear_range_table, 1); 2582 EXFUN (Fclear_range_table, 1);
2584 EXFUN (Fcoding_category_list, 0); 2583 EXFUN (Fcoding_category_list, 0);
2585 EXFUN (Fcoding_category_system, 1); 2584 EXFUN (Fcoding_category_system, 1);
2586 EXFUN (Fcoding_priority_list, 0); 2585 EXFUN (Fcoding_priority_list, 0);
2587 EXFUN (Fcoding_system_charset, 2); 2586 EXFUN (Fcoding_system_charset, 2);
2608 EXFUN (Fdecode_shift_jis_char, 1); 2607 EXFUN (Fdecode_shift_jis_char, 1);
2609 EXFUN (Fdefault_boundp, 1); 2608 EXFUN (Fdefault_boundp, 1);
2610 EXFUN (Fdefault_value, 1); 2609 EXFUN (Fdefault_value, 1);
2611 EXFUN (Fdefine_key, 3); 2610 EXFUN (Fdefine_key, 3);
2612 EXFUN (Fdelete_region, 3); 2611 EXFUN (Fdelete_region, 3);
2613 EXFUN (Fdelete_process, 1);
2614 EXFUN (Fdelq, 2); 2612 EXFUN (Fdelq, 2);
2615 EXFUN (Fdestructive_alist_to_plist, 1); 2613 EXFUN (Fdestructive_alist_to_plist, 1);
2616 EXFUN (Fdetect_coding_region, 3); 2614 EXFUN (Fdetect_coding_region, 3);
2617 EXFUN (Fdgettext, 2); 2615 EXFUN (Fdgettext, 2);
2618 EXFUN (Fding, 3); 2616 EXFUN (Fding, 3);
2658 EXFUN (Fformat, MANY); 2656 EXFUN (Fformat, MANY);
2659 EXFUN (Fforward_char, 2); 2657 EXFUN (Fforward_char, 2);
2660 EXFUN (Fforward_line, 2); 2658 EXFUN (Fforward_line, 2);
2661 EXFUN (Ffset, 2); 2659 EXFUN (Ffset, 2);
2662 EXFUN (Ffuncall, MANY); 2660 EXFUN (Ffuncall, MANY);
2663 EXFUN (Ffunctionp, 1);
2664 EXFUN (Fgeq, MANY); 2661 EXFUN (Fgeq, MANY);
2665 EXFUN (Fget, 3); 2662 EXFUN (Fget, 3);
2666 EXFUN (Fget_buffer_process, 1); 2663 EXFUN (Fget_buffer_process, 1);
2667 EXFUN (Fget_coding_system, 1); 2664 EXFUN (Fget_coding_system, 1);
2668 EXFUN (Fget_process, 1); 2665 EXFUN (Fget_process, 1);
2686 EXFUN (Flax_plist_remprop, 2); 2683 EXFUN (Flax_plist_remprop, 2);
2687 EXFUN (Flength, 1); 2684 EXFUN (Flength, 1);
2688 EXFUN (Fleq, MANY); 2685 EXFUN (Fleq, MANY);
2689 EXFUN (Flist, MANY); 2686 EXFUN (Flist, MANY);
2690 EXFUN (Flistp, 1); 2687 EXFUN (Flistp, 1);
2688 #ifdef HAVE_SHLIB
2691 EXFUN (Flist_modules, 0); 2689 EXFUN (Flist_modules, 0);
2692 EXFUN (Fload_module, 3); 2690 EXFUN (Fload_module, 3);
2693 EXFUN (Flookup_key, 3); 2691 #endif
2694 EXFUN (Flss, MANY); 2692 EXFUN (Flss, MANY);
2695 EXFUN (Fmake_byte_code, MANY); 2693 EXFUN (Fmake_byte_code, MANY);
2696 EXFUN (Fmake_coding_system, 4); 2694 EXFUN (Fmake_coding_system, 4);
2697 EXFUN (Fmake_glyph_internal, 1); 2695 EXFUN (Fmake_glyph_internal, 1);
2698 EXFUN (Fmake_list, 2); 2696 EXFUN (Fmake_list, 2);
2737 EXFUN (Fprinc, 2); 2735 EXFUN (Fprinc, 2);
2738 EXFUN (Fprint, 2); 2736 EXFUN (Fprint, 2);
2739 EXFUN (Fprocess_status, 1); 2737 EXFUN (Fprocess_status, 1);
2740 EXFUN (Fprogn, UNEVALLED); 2738 EXFUN (Fprogn, UNEVALLED);
2741 EXFUN (Fprovide, 1); 2739 EXFUN (Fprovide, 1);
2740 EXFUN (Fpurecopy, 1);
2742 EXFUN (Fput, 3); 2741 EXFUN (Fput, 3);
2743 EXFUN (Fput_range_table, 4); 2742 EXFUN (Fput_range_table, 4);
2744 EXFUN (Fput_text_property, 5); 2743 EXFUN (Fput_text_property, 5);
2745 EXFUN (Fquo, MANY); 2744 EXFUN (Fquo, MANY);
2746 EXFUN (Frassq, 2); 2745 EXFUN (Frassq, 2);
2747 EXFUN (Fread, 1); 2746 EXFUN (Fread, 1);
2748 EXFUN (Fread_key_sequence, 3); 2747 EXFUN (Fread_key_sequence, 3);
2749 EXFUN (Freally_free, 1); 2748 EXFUN (Freally_free, 1);
2750 EXFUN (Frem, 2); 2749 EXFUN (Frem, 2);
2751 EXFUN (Fremassq, 2); 2750 EXFUN (Fremassq, 2);
2752 EXFUN (Freplace_list, 2);
2753 EXFUN (Fselected_frame, 1); 2751 EXFUN (Fselected_frame, 1);
2754 EXFUN (Fset, 2); 2752 EXFUN (Fset, 2);
2755 EXFUN (Fset_coding_category_system, 2); 2753 EXFUN (Fset_coding_category_system, 2);
2756 EXFUN (Fset_coding_priority_list, 1); 2754 EXFUN (Fset_coding_priority_list, 1);
2757 EXFUN (Fset_default, 2); 2755 EXFUN (Fset_default, 2);
2797 EXFUN (Fverify_visited_file_modtime, 1); 2795 EXFUN (Fverify_visited_file_modtime, 1);
2798 EXFUN (Fvertical_motion, 3); 2796 EXFUN (Fvertical_motion, 3);
2799 EXFUN (Fwiden, 1); 2797 EXFUN (Fwiden, 1);
2800 2798
2801 2799
2802 extern Lisp_Object Q_style, Qabort, Qactually_requested; 2800 extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook;
2803 extern Lisp_Object Qactivate_menubar_hook; 2801 extern Lisp_Object Qafter, Qall, Qand;
2804 extern Lisp_Object Qafter, Qall, Qand, Qappend;
2805 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload; 2802 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
2806 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore; 2803 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
2807 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary; 2804 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary, Qbitmap, Qbitp, Qblinking;
2808 extern Lisp_Object Qbitmap, Qbitp, Qblinking; 2805 extern Lisp_Object Qboolean, Qbottom, Qbuffer, Qbuffer_file_coding_system;
2809 extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer;
2810 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton; 2806 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
2811 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcancel, Qcategory; 2807 extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory;
2812 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr; 2808 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr;
2813 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp; 2809 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp;
2814 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3; 2810 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3;
2815 extern Lisp_Object Qcenter, Qcircular_list, Qcircular_property_list; 2811 extern Lisp_Object Qcircular_list, Qcircular_property_list;
2816 extern Lisp_Object Qcoding_system_error; 2812 extern Lisp_Object Qcoding_system_error, Qcoding_system_p;
2817 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p; 2813 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p;
2818 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case; 2814 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
2819 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcopies, Qcr; 2815 extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical;
2820 extern Lisp_Object Qcritical, Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor; 2816 extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qcursor;
2821 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode; 2817 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
2822 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p; 2818 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
2823 extern Lisp_Object Qdialog;
2824 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table; 2819 extern Lisp_Object Qdim, Qdimension, Qdisabled, Qdisplay, Qdisplay_table;
2825 extern Lisp_Object Qdoc_string, Qdomain_error, Qduplex, Qdynarr_overhead; 2820 extern Lisp_Object Qdoc_string, Qdomain_error, Qdynarr_overhead;
2826 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open; 2821 extern Lisp_Object Qempty, Qencode, Qend_of_buffer, Qend_of_file, Qend_open;
2827 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal; 2822 extern Lisp_Object Qeol_cr, Qeol_crlf, Qeol_lf, Qeol_type, Qeq, Qeql, Qequal;
2828 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted; 2823 extern Lisp_Object Qerror, Qerror_conditions, Qerror_message, Qescape_quoted;
2829 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents; 2824 extern Lisp_Object Qeval, Qevent_live_p, Qexit, Qextent_live_p, Qextents;
2830 extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep; 2825 extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep, Qfile_error;
2831 extern Lisp_Object Qfile_name, Qfile_error;
2832 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output; 2826 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
2833 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground; 2827 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
2834 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfrom_page, Qfull_assoc; 2828 extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfunction, Qgap_overhead;
2835 extern Lisp_Object Qfuncall, Qfunction; 2829 extern Lisp_Object Qgeneric, Qgeometry, Qglobal, Qheight, Qhighlight, Qicon;
2836 extern Lisp_Object Qgap_overhead, Qgeneric, Qgeometry, Qglobal, Qheight; 2830 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit;
2837 extern Lisp_Object Qhelp, Qhighlight, Qhorizontal, Qicon;
2838 extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qignore, Qimage, Qinfo;
2839 extern Lisp_Object Qinherit;
2840 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only; 2831 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
2841 extern Lisp_Object Qinput_charset_conversion, Qinteger; 2832 extern Lisp_Object Qinput_charset_conversion, Qinteger;
2842 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p; 2833 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
2843 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal; 2834 extern Lisp_Object Qinteger_or_marker_p, Qintegerp, Qinteractive, Qinternal;
2844 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error; 2835 extern Lisp_Object Qinvalid_function, Qinvalid_read_syntax, Qio_error;
2845 extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeyboard, Qkeymap; 2836 extern Lisp_Object Qiso2022, Qkey, Qkey_assoc, Qkeymap, Qlambda, Qleft, Qlf;
2846 extern Lisp_Object Qlambda, Qlast_command, Qlayout, Qlandscape;
2847 extern Lisp_Object Qleft, Qleft_margin, Qlet, Qlf;
2848 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic; 2837 extern Lisp_Object Qlist, Qlistp, Qload, Qlock_shift, Qmacro, Qmagic;
2849 extern Lisp_Object Qmakunbound, Qmalformed_list, Qmalformed_property_list; 2838 extern Lisp_Object Qmalformed_list, Qmalformed_property_list;
2850 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers; 2839 extern Lisp_Object Qmalloc_overhead, Qmark, Qmarkers;
2851 extern Lisp_Object Qmenubar;
2852 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers; 2840 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
2853 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion; 2841 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
2854 extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows; 2842 extern Lisp_Object Qmouse_leave_buffer_hook, Qmswindows, Qname, Qnas, Qnatnump;
2855 extern Lisp_Object Qname, Qnas, Qnatnump, Qnative_layout; 2843 extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
2856 extern Lisp_Object Qno, Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
2857 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing; 2844 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing;
2858 extern Lisp_Object Qnothing_image_instance_p, Qnotice; 2845 extern Lisp_Object Qnothing_image_instance_p, Qnotice;
2859 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp; 2846 extern Lisp_Object Qnumber_char_or_marker_p, Qnumber_or_marker_p, Qnumberp;
2860 extern Lisp_Object Qobject, Qok, Qold_assoc, Qold_delete, Qold_delq; 2847 extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc;
2861 extern Lisp_Object Qold_rassoc; 2848 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother, Qoutput_charset_conversion;
2862 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother; 2849 extern Lisp_Object Qoverflow_error, Qpath, Qpoint, Qpointer, Qpointer_glyph_p;
2863 extern Lisp_Object Qorientation, Qoutput_charset_conversion; 2850 extern Lisp_Object Qpointer_image_instance_p, Qpost_read_conversion;
2864 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p; 2851 extern Lisp_Object Qpre_write_conversion, Qprint, Qprint_length;
2865 extern Lisp_Object Qpointer_image_instance_p, Qportrait, Qpost_read_conversion;
2866 extern Lisp_Object Qpre_write_conversion, Qprint, Qprinter, Qprint_length;
2867 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit; 2852 extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
2868 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char; 2853 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
2869 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler; 2854 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
2870 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource; 2855 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
2871 extern Lisp_Object Qretry, Qreturn, Qreverse, Qright, Qright_margin; 2856 extern Lisp_Object Qreturn, Qreverse, Qright, Qrun_hooks, Qsans_modifiers;
2872 extern Lisp_Object Qrun_hooks, Qsans_modifiers; 2857 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected, Qself_insert_command;
2873 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected; 2858 extern Lisp_Object Qsequencep, Qsetting_constant, Qseven, Qshift_jis, Qshort;
2874 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo;
2875 extern Lisp_Object Qsequencep, Qset, Qsetting_constant;
2876 extern Lisp_Object Qseven, Qshift_jis, Qshort;
2877 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace; 2859 extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
2878 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open; 2860 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
2879 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow; 2861 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
2880 extern Lisp_Object Qsubwindow_image_instance_p; 2862 extern Lisp_Object Qsubwindow_image_instance_p, Qsymbol, Qsyntax, Qt, Qtest;
2881 extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest; 2863 extern Lisp_Object Qtext, Qtext_image_instance_p, Qtimeout, Qtimestamp;
2882 extern Lisp_Object Qtext, Qtext_image_instance_p, Qthis_command, Qtimeout; 2864 extern Lisp_Object Qtoolbar, Qtop, Qtop_level, Qtrue_list_p, Qtty, Qtype;
2883 extern Lisp_Object Qtimestamp, Qtoolbar, Qtop, Qtop_margin, Qtop_level;
2884 extern Lisp_Object Qto_page, Qtrue_list_p, Qtty, Qtype;
2885 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error; 2865 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
2886 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories; 2866 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories;
2887 extern Lisp_Object Qvalue_assoc, Qvalues; 2867 extern Lisp_Object Qvalue_assoc, Qvalues;
2888 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical; 2868 extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvector;
2889 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning; 2869 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning, Qwidth, Qwidget, Qwindow;
2890 extern Lisp_Object Qwidth, Qwidget, Qwindow;
2891 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments; 2870 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
2892 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes, Qyes_or_no_p; 2871 extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p;
2893 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table; 2872 extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table;
2894 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table; 2873 extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table;
2895 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar; 2874 extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vbinary_process_input;
2875 extern Lisp_Object Vbinary_process_output, Vblank_menubar;
2896 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1; 2876 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
2897 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write; 2877 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
2898 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history; 2878 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history;
2899 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory; 2879 extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory;
2900 extern Lisp_Object Vconfigure_site_directory, Vconfigure_site_module_directory; 2880 extern Lisp_Object Vconfigure_site_directory, Vconfigure_site_module_directory;
2901 extern Lisp_Object Vconsole_list, Vcontrolling_terminal; 2881 extern Lisp_Object Vconsole_list, Vcontrolling_terminal;
2902 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list; 2882 extern Lisp_Object Vcurrent_compiled_function_annotation, Vcurrent_load_list;
2903 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory; 2883 extern Lisp_Object Vcurrent_mouse_event, Vcurrent_prefix_arg, Vdata_directory;
2904 extern Lisp_Object Vdirectory_sep_char, Vdisabled_command_hook; 2884 extern Lisp_Object Vdisabled_command_hook, Vdoc_directory, Vinternal_doc_file_name;
2905 extern Lisp_Object Vdoc_directory, Vinternal_doc_file_name;
2906 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version; 2885 extern Lisp_Object Vecho_area_buffer, Vemacs_major_version;
2907 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path; 2886 extern Lisp_Object Vemacs_minor_version, Vexec_directory, Vexec_path;
2908 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain; 2887 extern Lisp_Object Vexecuting_macro, Vfeatures, Vfile_domain;
2909 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit; 2888 extern Lisp_Object Vfile_name_coding_system, Vinhibit_quit;
2910 extern Lisp_Object Vinvocation_directory, Vinvocation_name; 2889 extern Lisp_Object Vinvocation_directory, Vinvocation_name;
2923 extern Lisp_Object Vrecent_keys_ring, Vshell_file_name, Vsite_directory; 2902 extern Lisp_Object Vrecent_keys_ring, Vshell_file_name, Vsite_directory;
2924 extern Lisp_Object Vsite_module_directory; 2903 extern Lisp_Object Vsite_module_directory;
2925 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str; 2904 extern Lisp_Object Vstandard_input, Vstandard_output, Vstdio_str;
2926 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system; 2905 extern Lisp_Object Vsynchronous_sounds, Vsystem_name, Vterminal_coding_system;
2927 extern Lisp_Object Vthis_command_keys, Vunread_command_event; 2906 extern Lisp_Object Vthis_command_keys, Vunread_command_event;
2907 extern Lisp_Object Vwin32_generate_fake_inodes, Vwin32_pipe_read_delay;
2928 extern Lisp_Object Vx_initial_argv_list; 2908 extern Lisp_Object Vx_initial_argv_list;
2929 2909
2930 #endif /* INCLUDED_lisp_h_ */ 2910 extern Lisp_Object Qmakunbound, Qset;
2911
2912 #endif /* _XEMACS_LISP_H_ */