XEmacs 21.2.41 "Polyhymnia".
[chise/xemacs-chise.git.1] / src / lisp.h
index 1d21663..8352b17 100644 (file)
@@ -70,6 +70,9 @@ void Dynarr_free (void *d);
   ((dynarr_type *) Dynarr_newf (sizeof (type)))
 #define Dynarr_at(d, pos) ((d)->base[pos])
 #define Dynarr_atp(d, pos) (&Dynarr_at (d, pos))
+#define Dynarr_begin(d) Dynarr_atp (d, 0)
+#define Dynarr_end(d) Dynarr_atp (d, Dynarr_length (d))
+#define Dynarr_sizeof(d) ((d)->cur * (d)->elsize)
 #define Dynarr_length(d) ((d)->cur)
 #define Dynarr_largest(d) ((d)->largest)
 #define Dynarr_reset(d) ((d)->cur = 0)
@@ -280,17 +283,16 @@ void assert_failed (const char *, int, const char *);
 /*     basic char/int typedefs     */
 /* ------------------------------- */
 
-/* The definitions we put here use typedefs to convey additional meaning to
-   types that by themselves are pretty general.  Stuff pointed to by a
+/* The definitions we put here use typedefs to attribute specific meaning
+   to types that by themselves are pretty general.  Stuff pointed to by a
    char * or unsigned char * will nearly always be one of four types:
    a) pointer to internally-formatted text; b) pointer to text in some
    external format, which can be defined as all formats other than the
    internal one; c) pure ASCII text; d) binary data that is not meant to
    be interpreted as text. [A fifth possible type "e) a general pointer
-   to memory" should be replaced with void *.] By using these more specific
-   types in lieu of the general ones, you clear up greatly the confusions
-   that inevitably will occur when it's not clearly known the semantics of
-   a char * argument being studied. */
+   to memory" should be replaced with void *.]  Using these more specific
+   types rather than the general ones helps avoid the confusions that
+   occur when the semantics of a char * argument being studied are unclear. */
 
 typedef unsigned char UChar;
 
@@ -571,6 +573,11 @@ typedef struct
   Dynarr_declare (Lisp_Object);
 } Lisp_Object_dynarr;
 
+typedef struct
+{
+  Dynarr_declare (Lisp_Object *);
+} Lisp_Object_ptr_dynarr;
+
 /* Close your eyes now lest you vomit or spontaneously combust ... */
 
 #define HACKEQ_UNSAFE(obj1, obj2)                              \
@@ -2098,6 +2105,8 @@ void debug_ungcpro(char *, int, struct gcpro *);
     RETURN_SANS_WARNINGS ret_nunb_val; \
 } while (0)
 
+extern Lisp_Object_ptr_dynarr *staticpros;
+
 /* Call staticpro (&var) to protect static variable `var'. */
 void staticpro (Lisp_Object *);
 
@@ -2105,19 +2114,35 @@ void staticpro (Lisp_Object *);
 /* var will not be saved at dump time */
 void staticpro_nodump (Lisp_Object *);
 
-/* Call dumpstruct(&var, &desc) to dump the structure pointed to by `var'. */
-void dumpstruct (void *, const struct struct_description *);
+/* Call dump_add_root_struct_ptr (&var, &desc) to dump the structure pointed to by `var'. */
+#ifdef PDUMP
+void dump_add_root_struct_ptr (void *, const struct struct_description *);
+#else
+#define dump_add_root_struct_ptr(varaddr,descaddr) DO_NOTHING
+#endif
 
-/* Call dumpopaque(&var, size) to dump the opaque static structure `var'. */
-void dumpopaque (void *, size_t);
+/* Call dump_add_opaque (&var, size) to dump the opaque static structure `var'. */
+#ifdef PDUMP
+void dump_add_opaque (void *, size_t);
+#else
+#define dump_add_opaque(varaddr,size) DO_NOTHING
+#endif
 
-/* Call pdump_wire(&var) to ensure that var is properly updated after pdump. */
-void pdump_wire (Lisp_Object *);
+/* Call dump_add_root_object (&var) to ensure that var is properly updated after pdump. */
+#ifdef PDUMP
+void dump_add_root_object (Lisp_Object *);
+#else
+#define dump_add_root_object(varaddr) DO_NOTHING
+#endif
 
-/* Call pdump_wire(&var) to ensure that var  is properly updated after
-   pdump.  var  must point to  a linked list  of  objects out of which
+/* Call dump_add_root_object (&var) to ensure that var is properly updated after
+   pdump.  var must point to a linked list of objects out of which
    some may not be dumped */
-void pdump_wire_list (Lisp_Object *);
+#ifdef PDUMP
+void dump_add_weak_object_chain (Lisp_Object *);
+#else
+#define dump_add_weak_object_chain(varaddr) DO_NOTHING
+#endif
 
 /* Nonzero means Emacs has already been initialized.
    Used during startup to detect startup of dumped Emacs.  */
@@ -2730,7 +2755,7 @@ void write_string_1 (const Bufbyte *, Bytecount, Lisp_Object);
 void print_cons (Lisp_Object, Lisp_Object, int);
 void print_vector (Lisp_Object, Lisp_Object, int);
 void print_string (Lisp_Object, Lisp_Object, int);
-void long_to_string (char *, long);
+char *long_to_string (char *, long);
 void print_internal (Lisp_Object, Lisp_Object, int);
 void print_symbol (Lisp_Object, Lisp_Object, int);
 void print_float (Lisp_Object, Lisp_Object, int);
@@ -2768,7 +2793,7 @@ Bytind bi_find_next_newline_no_quit (struct buffer *, Bytind, int);
 Bytind bi_find_next_emchar_in_string (Lisp_String*, Emchar, Bytind, EMACS_INT);
 Bufpos find_before_next_newline (struct buffer *, Bufpos, Bufpos, int);
 struct re_pattern_buffer *compile_pattern (Lisp_Object, struct re_registers *,
-                                          char *, int, Error_behavior);
+                                          Lisp_Object, int, Error_behavior);
 Bytecount fast_string_match (Lisp_Object,  const Bufbyte *,
                             Lisp_Object, Bytecount,
                             Bytecount, int, Error_behavior, int);
@@ -3182,9 +3207,8 @@ extern Lisp_Object Qwrong_type_argument, Qyes_or_no_p;
 
 /*--------------- prototypes for variables of type Lisp_Object  ------------*/
 
-extern Lisp_Object Vactivate_menubar_hook, Vascii_canon_table;
-extern Lisp_Object Vascii_downcase_table, Vascii_eqv_table;
-extern Lisp_Object Vascii_upcase_table, Vautoload_queue, Vblank_menubar;
+extern Lisp_Object Vactivate_menubar_hook;
+extern Lisp_Object Vautoload_queue, Vblank_menubar;
 extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1;
 extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write;
 extern Lisp_Object Vcoding_system_hash_table, Vcommand_history;
@@ -3206,8 +3230,6 @@ extern Lisp_Object Vload_file_name_internal;
 extern Lisp_Object Vload_file_name_internal_the_purecopy, Vload_history;
 extern Lisp_Object Vload_path, Vmark_even_if_inactive, Vmenubar_configuration;
 extern Lisp_Object Vminibuf_preprompt, Vminibuf_prompt, Vminibuffer_zero;
-extern Lisp_Object Vmirror_ascii_canon_table, Vmirror_ascii_downcase_table;
-extern Lisp_Object Vmirror_ascii_eqv_table, Vmirror_ascii_upcase_table;
 extern Lisp_Object Vmodule_directory, Vmswindows_downcase_file_names;
 extern Lisp_Object Vmswindows_get_true_file_attributes, Vobarray;
 extern Lisp_Object Vprint_length, Vprint_level, Vprocess_environment;