/* Fundamental definitions for GNU Emacs Lisp interpreter.
- Copyright (C) 1985, 1986, 1987, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1986, 1987, 1993, 1994 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#define VALMASK ((1<<VALBITS) - 1)
#endif
#define GCTYPEMASK ((1<<GCTYPEBITS) - 1)
+
+/* Two flags that are set during GC. On some machines, these flags
+ are defined differently by the m- file. */
+
+/* This is set in the car of a cons and in the plist slot of a symbol
+ to indicate it is marked. Likewise in the plist slot of an interval,
+ the chain slot of a marker, the type slot of a float, and the name
+ slot of a buffer.
+
+ In strings, this bit in the size field indicates that the string
+ is a "large" one, one which was separately malloc'd
+ rather than being part of a string block. */
+
#define MARKBIT (1 << (VALBITS + GCTYPEBITS))
+/* In the size word of a vector, this bit means the vector has been marked.
+ In the size word of a large string, likewise. */
+
+#ifndef ARRAY_MARK_FLAG
+#define ARRAY_MARK_FLAG ((MARKBIT >> 1) & ~MARKBIT)
+#endif /* no ARRAY_MARK_FLAG */
+
+#if ARRAY_MARK_FLAG == MARKBIT
+you lose
+#endif
+
#endif /* NO_UNION_TYPE */
\f
/* These macros extract various sorts of values from a Lisp_Object.
pretty quickly. */
#define GLYPH unsigned int
+#ifdef HAVE_X_WINDOWS
+/* The FAST macros assume that we already know we're in an X window. */
+
/* Given a character code and a face ID, return the appropriate glyph. */
-#define MAKE_GLYPH(char, face) ((char) | ((face) << 8))
+#define FAST_MAKE_GLYPH(char, face) ((char) | ((face) << 8))
/* Return a glyph's character code. */
-#define GLYPH_CHAR(glyph) ((glyph) & 0xff)
+#define FAST_GLYPH_CHAR(glyph) ((glyph) & 0xff)
/* Return a glyph's face ID. */
-#define GLYPH_FACE(glyph) (((glyph) >> 8) & ((1 << 24) - 1))
+#define FAST_GLYPH_FACE(glyph) (((glyph) >> 8) & ((1 << 24) - 1))
+
+/* Slower versions that test the frame type first. */
+#define MAKE_GLYPH(f, char, face) (FRAME_TERMCAP_P (f) ? (char) \
+ : FAST_MAKE_GLYPH (char, face))
+#define GLYPH_CHAR(f, g) (FRAME_TERMCAP_P (f) ? (g) : FAST_GLYPH_CHAR (g))
+#define GLYPH_FACE(f, g) (FRAME_TERMCAP_P (f) ? (0) : FAST_GLYPH_FACE (g))
+#else
+#define MAKE_GLYPH(f, char, face) (char)
+#define GLYPH_CHAR(f, g) (g)
+#define GLYPH_FACE(f, g) (g)
+#endif
+/* The ID of the mode line highlighting face. */
+#define GLYPH_MODE_LINE_FACE 1
\f
/* Data type checking */
#define CHECK_NATNUM(x, i) \
do { if (XTYPE ((x)) != Lisp_Int || XINT ((x)) < 0) \
- x = wrong_type_argument (Qnatnump, (x)); } while (0)
+ x = wrong_type_argument (Qwholenump, (x)); } while (0)
#define CHECK_MARKER(x, i) \
do { if (XTYPE ((x)) != Lisp_Marker) x = wrong_type_argument (Qmarkerp, (x)); } while (0)
#define UPCASE_TABLE XSTRING (current_buffer->upcase_table)->data
extern Lisp_Object Vascii_downcase_table, Vascii_upcase_table;
+extern Lisp_Object Vascii_canon_table, Vascii_eqv_table;
\f
/* number of bytes of structure consed since last GC */
extern Lisp_Object Qrange_error, Qdomain_error, Qsingularity_error;
extern Lisp_Object Qoverflow_error, Qunderflow_error;
-extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qsymbolp, Qlistp, Qconsp;
+extern Lisp_Object Qintegerp, Qnumberp, Qnatnump, Qwholenump;
+extern Lisp_Object Qsymbolp, Qlistp, Qconsp;
extern Lisp_Object Qstringp, Qarrayp, Qsequencep, Qbufferp;
extern Lisp_Object Qchar_or_string_p, Qmarkerp, Qvectorp;
extern Lisp_Object Qinteger_or_marker_p, Qnumber_or_marker_p;
extern Lisp_Object pure_cons (), make_pure_vector ();
extern Lisp_Object Fgarbage_collect ();
extern Lisp_Object Fmake_byte_code ();
+extern int gc_in_progress;
/* Defined in print.c */
extern Lisp_Object Vprin1_to_string_buffer;
extern Lisp_Object Vinhibit_quit, Qinhibit_quit, Vquit_flag;
extern Lisp_Object Vmocklisp_arguments, Qmocklisp, Qmocklisp_arguments;
extern Lisp_Object Vautoload_queue;
+/* To run a normal hook, do
+ if (!NILP (Vrun_hooks))
+ call1 (Vrun_hooks, Qmy_funny_hook); */
extern Lisp_Object Vrun_hooks;
extern Lisp_Object Fand (), For (), Fif (), Fprogn (), Fprog1 (), Fprog2 ();
extern Lisp_Object Fsetq (), Fquote ();
extern Lisp_Object Fbarf_if_buffer_read_only ();
extern Lisp_Object Fcurrent_buffer (), Fswitch_to_buffer (), Fpop_to_buffer ();
extern Lisp_Object Fother_buffer ();
+extern Lisp_Object Foverlay_get ();
extern Lisp_Object Qoverlayp;
extern struct buffer *all_buffers;
extern int window_internal_height (), window_internal_width ();
/* defined in frame.c */
+extern Lisp_Object Qvisible;
extern Lisp_Object Fframep ();
extern Lisp_Object Fselect_frame ();
extern Lisp_Object Ffocus_frame ();
/* defined in process.c */
extern Lisp_Object Fget_process (), Fget_buffer_process (), Fprocessp ();
extern Lisp_Object Fprocess_status (), Fkill_process ();
+extern Lisp_Object Fprocess_send_eof ();
/* defined in callproc.c */
extern Lisp_Object Vexec_path, Vexec_directory, Vdata_directory;
extern char *egetenv ();
-/* Return the name of the machine we're running on. */
-extern char *get_system_name ();
+/* Set up the name of the machine we're running on. */
+extern void init_system_name ();