Resorted; add some missing Morohashi's Daikanwa characters; add
[chise/xemacs-chise.git] / src / lisp.h
index 1cdb8ee..10bc496 100644 (file)
@@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA.  */
 #include <stdarg.h>
 #include <stddef.h>            /* offsetof */
 #include <sys/types.h>
+#include <limits.h>
 
 /* ---- Dynamic arrays ---- */
 
@@ -63,6 +64,8 @@ void Dynarr_delete_many (void *d, int start, int len);
 void Dynarr_free (void *d);
 
 #define Dynarr_new(type) ((type##_dynarr *) Dynarr_newf (sizeof (type)))
+#define Dynarr_new2(dynarr_type, type) \
+  ((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_length(d) ((d)->cur)
@@ -218,7 +221,7 @@ void xfree (void *);
 #ifdef USE_ASSERTIONS
 /* Highly dubious kludge */
 /*   (thanks, Jamie, I feel better now -- ben) */
-DECLARE_DOESNT_RETURN (assert_failed (const char *, int, const char *));
+void assert_failed (const char *, int, const char *);
 # define abort() (assert_failed (__FILE__, __LINE__, "abort()"))
 # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x))
 #else
@@ -942,7 +945,7 @@ Bytecount charcount_to_bytecount (const Bufbyte *ptr, Charcount len);
 #define string_byte_addr(s, i) (&((s)->data[i]))
 #define set_string_length(s, len) ((void) ((s)->size = (len)))
 #define set_string_data(s, ptr) ((void) ((s)->data = (ptr)))
-#define set_string_byte(s, i, c) ((void) ((s)->data[i] = (c)))
+#define set_string_byte(s, i, b) ((void) ((s)->data[i] = (b)))
 
 void resize_string (Lisp_String *s, Bytecount pos, Bytecount delta);
 
@@ -964,7 +967,7 @@ void set_string_char (Lisp_String *s, Charcount i, Emchar c);
 # define string_char_length(s) string_length (s)
 # define string_char(s, i) ((Emchar) string_byte (s, i))
 # define string_char_addr(s, i) string_byte_addr (s, i)
-# define set_string_char(s, i, c) set_string_byte (s, i, c)
+# define set_string_char(s, i, c) set_string_byte (s, i, (Bufbyte)c)
 
 #endif /* not MULE */
 
@@ -1177,7 +1180,7 @@ XCHAR (Lisp_Object obj)
 
 #else
 
-#define XCHAR(x) XCHARVAL (x)
+#define XCHAR(x) ((Emchar)XCHARVAL (x))
 
 #endif
 
@@ -1386,7 +1389,10 @@ enum weak_list_type
   /* element disappears if it's a cons and its car is unmarked. */
   WEAK_LIST_KEY_ASSOC,
   /* element disappears if it's a cons and its cdr is unmarked. */
-  WEAK_LIST_VALUE_ASSOC
+  WEAK_LIST_VALUE_ASSOC,
+  /* element disappears if it's a cons and neither its car nor
+     its cdr is marked. */
+  WEAK_LIST_FULL_ASSOC
 };
 
 struct weak_list
@@ -1543,6 +1549,12 @@ Lisp_Object,Lisp_Object,Lisp_Object
 extern int specpdl_depth_counter;
 #define specpdl_depth() specpdl_depth_counter
 
+
+#define CHECK_FUNCTION(fun) do {               \
+ while (NILP (Ffunctionp (fun)))               \
+   signal_invalid_function_error (fun);                \
+ } while (0)
+
 \f
 /************************************************************************/
 /*                        Checking for QUIT                            */
@@ -1604,7 +1616,7 @@ void signal_quit (void);
 #define HASH9(a,b,c,d,e,f,g,h,i) (GOOD_HASH * HASH8 (a,b,c,d,e,f,g,h) + (i))
 
 #define LISP_HASH(obj) ((unsigned long) LISP_TO_VOID (obj))
-unsigned long string_hash (const void *xv);
+unsigned long string_hash (const char *xv);
 unsigned long memory_hash (const void *xv, size_t size);
 unsigned long internal_hash (Lisp_Object obj, int depth);
 unsigned long internal_array_hash (Lisp_Object *arr, int size, int depth);
@@ -1980,6 +1992,10 @@ typedef unsigned long uintptr_t;
 void release_breathing_space (void);
 Lisp_Object noseeum_cons (Lisp_Object, Lisp_Object);
 Lisp_Object make_vector (size_t, Lisp_Object);
+#ifdef HAVE_GGC
+Lisp_Object make_older_vector (size_t, Lisp_Object);
+void make_vector_newer (Lisp_Object);
+#endif
 Lisp_Object vector1 (Lisp_Object);
 Lisp_Object vector2 (Lisp_Object, Lisp_Object);
 Lisp_Object vector3 (Lisp_Object, Lisp_Object, Lisp_Object);
@@ -2049,6 +2065,10 @@ char *egetenv (const char *);
 /* Defined in console.c */
 void stuff_buffered_input (Lisp_Object);
 
+/* Defined in console-msw.c */
+EXFUN (Fmswindows_message_box, 3);
+extern int mswindows_message_outputted;
+
 /* Defined in data.c */
 DECLARE_DOESNT_RETURN (c_write_error (Lisp_Object));
 DECLARE_DOESNT_RETURN (lisp_write_error (Lisp_Object));
@@ -2127,6 +2147,7 @@ Lisp_Object decode_env_path (const char *, const char *);
 Lisp_Object decode_path (const char *);
 /* Nonzero means don't do interactive redisplay and don't change tty modes */
 extern int noninteractive, noninteractive1;
+extern int fatal_error_in_progress;
 extern int preparing_for_armageddon;
 extern int emacs_priority;
 extern int running_asynch_code;
@@ -2252,6 +2273,7 @@ void reset_this_command_keys (Lisp_Object, int);
 Lisp_Object enqueue_misc_user_event (Lisp_Object, Lisp_Object, Lisp_Object);
 Lisp_Object enqueue_misc_user_event_pos (Lisp_Object, Lisp_Object,
                                         Lisp_Object, int, int, int, int);
+extern int modifier_keys_are_sticky;
 
 /* Defined in event-Xt.c */
 void enqueue_Xt_dispatch_event (Lisp_Object event);
@@ -2642,6 +2664,7 @@ EXFUN (Fforward_char, 2);
 EXFUN (Fforward_line, 2);
 EXFUN (Ffset, 2);
 EXFUN (Ffuncall, MANY);
+EXFUN (Ffunctionp, 1);
 EXFUN (Fgeq, MANY);
 EXFUN (Fget, 3);
 EXFUN (Fget_buffer_process, 1);
@@ -2780,15 +2803,16 @@ EXFUN (Fvertical_motion, 3);
 EXFUN (Fwiden, 1);
 
 
-extern Lisp_Object Q_style, Qactually_requested, Qactivate_menubar_hook;
-extern Lisp_Object Qafter, Qall, Qand;
+extern Lisp_Object Q_style, Qabort, Qactually_requested;
+extern Lisp_Object Qactivate_menubar_hook;
+extern Lisp_Object Qafter, Qall, Qand, Qappend;
 extern Lisp_Object Qarith_error, Qarrayp, Qassoc, Qat, Qautodetect, Qautoload;
 extern Lisp_Object Qbackground, Qbackground_pixmap, Qbad_variable, Qbefore;
 extern Lisp_Object Qbeginning_of_buffer, Qbig5, Qbinary;
 extern Lisp_Object Qbitmap, Qbitp, Qblinking;
 extern Lisp_Object Qboolean, Qbottom, Qbottom_margin, Qbuffer;
 extern Lisp_Object Qbuffer_glyph_p, Qbuffer_live_p, Qbuffer_read_only, Qbutton;
-extern Lisp_Object Qbyte_code, Qcall_interactively, Qcategory;
+extern Lisp_Object Qbyte_code, Qcall_interactively, Qcancel, Qcategory;
 extern Lisp_Object Qcategory_designator_p, Qcategory_table_value_p, Qccl, Qcdr;
 extern Lisp_Object Qchannel, Qchar, Qchar_or_string_p, Qcharacter, Qcharacterp;
 extern Lisp_Object Qchars, Qcharset_g0, Qcharset_g1, Qcharset_g2, Qcharset_g3;
@@ -2796,8 +2820,8 @@ extern Lisp_Object Qcenter, Qcircular_list, Qcircular_property_list;
 extern Lisp_Object Qcoding_system_error;
 extern Lisp_Object Qcolor, Qcolor_pixmap_image_instance_p;
 extern Lisp_Object Qcolumns, Qcommand, Qcommandp, Qcompletion_ignore_case;
-extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcr, Qcritical;
-extern Lisp_Object Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor;
+extern Lisp_Object Qconsole, Qconsole_live_p, Qconst_specifier, Qcopies, Qcr;
+extern Lisp_Object Qcritical, Qcrlf, Qctext, Qcurrent_menubar, Qctext, Qcursor;
 extern Lisp_Object Qcyclic_variable_indirection, Qdata, Qdead, Qdecode;
 extern Lisp_Object Qdefault, Qdefun, Qdelete, Qdelq, Qdevice, Qdevice_live_p;
 extern Lisp_Object Qdialog;
@@ -2811,10 +2835,12 @@ extern Lisp_Object Qexternal_debugging_output, Qface, Qfeaturep;
 extern Lisp_Object Qfile_name, Qfile_error;
 extern Lisp_Object Qfont, Qforce_g0_on_output, Qforce_g1_on_output;
 extern Lisp_Object Qforce_g2_on_output, Qforce_g3_on_output, Qforeground;
-extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfuncall, Qfunction;
+extern Lisp_Object Qformat, Qframe, Qframe_live_p, Qfrom_page, Qfull_assoc;
+extern Lisp_Object Qfuncall, Qfunction;
 extern Lisp_Object Qgap_overhead, Qgeneric, Qgeometry, Qglobal, Qheight;
-extern Lisp_Object Qhighlight, Qhorizontal, Qicon;
-extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qimage, Qinfo, Qinherit;
+extern Lisp_Object Qhelp, Qhighlight, Qhorizontal, Qicon;
+extern Lisp_Object Qicon_glyph_p, Qid, Qidentity, Qignore, Qimage, Qinfo;
+extern Lisp_Object Qinherit;
 extern Lisp_Object Qinhibit_quit, Qinhibit_read_only;
 extern Lisp_Object Qinput_charset_conversion, Qinteger;
 extern Lisp_Object Qinteger_char_or_marker_p, Qinteger_or_char_p;
@@ -2830,12 +2856,13 @@ extern Lisp_Object Qmenubar;
 extern Lisp_Object Qmax, Qmemory, Qmessage, Qminus, Qmnemonic, Qmodifiers;
 extern Lisp_Object Qmono_pixmap_image_instance_p, Qmotion;
 extern Lisp_Object Qmouse_leave_buffer_hook, Qmsprinter, Qmswindows;
-extern Lisp_Object Qname, Qnas, Qnatnump;
-extern Lisp_Object Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
+extern Lisp_Object Qname, Qnas, Qnatnump, Qnative_layout;
+extern Lisp_Object Qno, Qno_ascii_cntl, Qno_ascii_eol, Qno_catch;
 extern Lisp_Object Qno_conversion, Qno_iso6429, Qnone, Qnot, Qnothing;
 extern Lisp_Object Qnothing_image_instance_p, Qnotice;
 extern Lisp_Object Qnumber_char_or_marker_p, Qnumberp;
-extern Lisp_Object Qobject, Qold_assoc, Qold_delete, Qold_delq, Qold_rassoc;
+extern Lisp_Object Qobject, Qok, Qold_assoc, Qold_delete, Qold_delq;
+extern Lisp_Object Qold_rassoc;
 extern Lisp_Object Qold_rassq, Qonly, Qor, Qother;
 extern Lisp_Object Qorientation, Qoutput_charset_conversion;
 extern Lisp_Object Qoverflow_error, Qpoint, Qpointer, Qpointer_glyph_p;
@@ -2845,7 +2872,7 @@ extern Lisp_Object Qprint_string_length, Qprocess, Qprogn, Qprovide, Qquit;
 extern Lisp_Object Qquote, Qrange_error, Qrassoc, Qrassq, Qread_char;
 extern Lisp_Object Qread_from_minibuffer, Qreally_early_error_handler;
 extern Lisp_Object Qregion_beginning, Qregion_end, Qrequire, Qresource;
-extern Lisp_Object Qreturn, Qreverse, Qright, Qright_margin;
+extern Lisp_Object Qretry, Qreturn, Qreverse, Qright, Qright_margin;
 extern Lisp_Object Qrun_hooks, Qsans_modifiers;
 extern Lisp_Object Qsave_buffers_kill_emacs, Qsearch, Qselected;
 extern Lisp_Object Qself_insert_command, Qself_insert_defer_undo;
@@ -2855,10 +2882,10 @@ extern Lisp_Object Qsignal, Qsimple, Qsingularity_error, Qsize, Qspace;
 extern Lisp_Object Qspecifier, Qstandard_input, Qstandard_output, Qstart_open;
 extern Lisp_Object Qstream, Qstring, Qstring_lessp, Qsubwindow;
 extern Lisp_Object Qsubwindow_image_instance_p;
-extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest, Qtext;
-extern Lisp_Object Qtext_image_instance_p, Qthis_command, Qtimeout, Qtimestamp;
-extern Lisp_Object Qtoolbar, Qtop, Qtop_margin, Qtop_level;
-extern Lisp_Object Qtrue_list_p, Qtty, Qtype;
+extern Lisp_Object Qsymbol, Qsyntax, Qt, Qterminal, Qtest;
+extern Lisp_Object Qtext, Qtext_image_instance_p, Qthis_command, Qtimeout;
+extern Lisp_Object Qtimestamp, Qtoolbar, Qtop, Qtop_margin, Qtop_level;
+extern Lisp_Object Qto_page, Qtrue_list_p, Qtty, Qtype;
 extern Lisp_Object Qunbound, Qundecided, Qundefined, Qunderflow_error;
 extern Lisp_Object Qunderline, Qunimplemented, Quser_files_and_directories;
 extern Lisp_Object Qvalue_assoc, Qvalues;
@@ -2866,7 +2893,7 @@ extern Lisp_Object Qvariable_documentation, Qvariable_domain, Qvertical;
 extern Lisp_Object Qvoid_function, Qvoid_variable, Qwarning;
 extern Lisp_Object Qwidth, Qwidget, Qwindow;
 extern Lisp_Object Qwindow_live_p, Qwindow_system, Qwrong_number_of_arguments;
-extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes_or_no_p;
+extern Lisp_Object Qwrong_type_argument, Qx, Qy, Qyes, Qyes_or_no_p;
 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;