X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/acfa068f4a1a4652b784af1d7aaac92929399249..dd8c2f5adeba029790a007ec829e18442a4ade36:/src/lisp.h diff --git a/src/lisp.h b/src/lisp.h index 3a473a60b4..113ae16fc1 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -25,6 +25,7 @@ along with GNU Emacs. If not, see . */ #include #include #include +#include #include #include @@ -344,15 +345,11 @@ static ptrdiff_t const PSEUDOVECTOR_FLAG = PSEUDOVECTOR_FLAG; /* In a pseudovector, the size field actually contains a word with one - PSEUDOVECTOR_FLAG bit set, and exactly one of the following bits to - indicate the actual type. - We use a bitset, even tho only one of the bits can be set at any - particular time just so as to be able to use micro-optimizations such as - testing membership of a particular subset of pseudovectors in Fequal. - It is not crucial, but there are plenty of bits here, so why not do it? */ + PSEUDOVECTOR_FLAG bit set, and one of the following values extracted + with PVEC_TYPE_MASK to indicate the actual type. */ enum pvec_type { - PVEC_NORMAL_VECTOR = 0, /* Unused! */ + PVEC_NORMAL_VECTOR, PVEC_FREE, PVEC_PROCESS, PVEC_FRAME, @@ -1487,6 +1484,16 @@ struct Lisp_Float #define XFLOAT_DATA(f) (0 ? XFLOAT (f)->u.data : XFLOAT (f)->u.data) #define XFLOAT_INIT(f, n) (XFLOAT (f)->u.data = (n)) +/* Most hosts nowadays use IEEE floating point, so they use IEC 60559 + representations, have infinities and NaNs, and do not trap on + exceptions. Define IEEE_FLOATING_POINT if this host is one of the + typical ones. The C11 macro __STDC_IEC_559__ is close to what is + wanted here, but is not quite right because Emacs does not require + all the features of C11 Annex F (and does not require C11 at all, + for that matter). */ +#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ + && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) + /* A character, declared with the following typedef, is a member of some character set associated with the current buffer. */ #ifndef _UCHAR_T /* Protect against something in ctab.h on AIX. */ @@ -2020,6 +2027,18 @@ extern ptrdiff_t specpdl_size; #define SPECPDL_INDEX() (specpdl_ptr - specpdl) +struct backtrace +{ + struct backtrace *next; + Lisp_Object function; + Lisp_Object *args; /* Points to vector of args. */ + ptrdiff_t nargs; /* Length of vector. */ + /* Nonzero means call value of debugger when done with this operation. */ + unsigned int debug_on_exit : 1; +}; + +extern struct backtrace *backtrace_list; + /* Everything needed to describe an active condition case. Members are volatile if their values need to survive _longjmp when @@ -2108,7 +2127,7 @@ extern char *stack_bottom; a request to exit Emacs when it is safe to do. */ extern void process_pending_signals (void); -extern int pending_signals; +extern bool volatile pending_signals; extern void process_quit_flag (void); #define QUIT \ @@ -2633,7 +2652,6 @@ extern _Noreturn Lisp_Object wrong_type_argument (Lisp_Object, Lisp_Object); extern Lisp_Object do_symval_forwarding (union Lisp_Fwd *); extern void set_internal (Lisp_Object, Lisp_Object, Lisp_Object, bool); extern void syms_of_data (void); -extern void init_data (void); extern void swap_in_global_binding (struct Lisp_Symbol *); /* Defined in cmds.c */ @@ -2721,6 +2739,7 @@ extern void init_fringe_once (void); extern Lisp_Object QCascent, QCmargin, QCrelief; extern Lisp_Object QCconversion; extern int x_bitmap_mask (struct frame *, ptrdiff_t); +extern void reset_image_types (void); extern void syms_of_image (void); /* Defined in insdel.c. */ @@ -2905,6 +2924,7 @@ build_string (const char *str) extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); extern void make_byte_code (struct Lisp_Vector *); +extern Lisp_Object Qautomatic_gc; extern Lisp_Object Qchar_table_extra_slots; extern struct Lisp_Vector *allocate_vector (EMACS_INT); extern struct Lisp_Vector *allocate_pseudovector (int memlen, int lisplen, int tag); @@ -3007,7 +3027,7 @@ extern Lisp_Object oblookup (Lisp_Object, const char *, ptrdiff_t, ptrdiff_t); } while (0) extern int openp (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, Lisp_Object); -Lisp_Object string_to_number (char const *, int, int); +extern Lisp_Object string_to_number (char const *, int, bool); extern void map_obarray (Lisp_Object, void (*) (Lisp_Object, Lisp_Object), Lisp_Object); extern void dir_warning (const char *, Lisp_Object); @@ -3162,6 +3182,7 @@ extern void internal_delete_file (Lisp_Object); extern void syms_of_fileio (void); extern Lisp_Object make_temp_name (Lisp_Object, bool); extern Lisp_Object Qdelete_file; +extern bool check_existing (const char *); /* Defined in search.c. */ extern void shrink_regexp_cache (void); @@ -3178,9 +3199,9 @@ extern ptrdiff_t fast_string_match_ignore_case (Lisp_Object, Lisp_Object); extern ptrdiff_t fast_looking_at (Lisp_Object, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, Lisp_Object); extern ptrdiff_t scan_buffer (int, ptrdiff_t, ptrdiff_t, ptrdiff_t, - ptrdiff_t *, int); + ptrdiff_t *, bool); extern EMACS_INT scan_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t, - EMACS_INT, int); + EMACS_INT, bool); extern ptrdiff_t find_next_newline (ptrdiff_t, int); extern ptrdiff_t find_next_newline_no_quit (ptrdiff_t, ptrdiff_t); extern ptrdiff_t find_before_next_newline (ptrdiff_t, ptrdiff_t, ptrdiff_t); @@ -3223,14 +3244,17 @@ extern Lisp_Object Qdisabled, QCfilter; extern Lisp_Object Qup, Qdown, Qbottom; extern Lisp_Object Qtop; extern Lisp_Object last_undo_boundary; -extern int input_pending; +extern bool input_pending; extern Lisp_Object menu_bar_items (Lisp_Object); extern Lisp_Object tool_bar_items (Lisp_Object, int *); extern void discard_mouse_events (void); +#ifdef USABLE_SIGIO +void handle_input_available_signal (int); +#endif extern Lisp_Object pending_funcalls; -extern int detect_input_pending (void); -extern int detect_input_pending_ignore_squeezables (void); -extern int detect_input_pending_run_timers (int); +extern bool detect_input_pending (void); +extern bool detect_input_pending_ignore_squeezables (void); +extern bool detect_input_pending_run_timers (bool); extern void safe_run_hooks (Lisp_Object); extern void cmd_error_internal (Lisp_Object, const char *); extern Lisp_Object command_loop_1 (void); @@ -3244,7 +3268,7 @@ extern void keys_of_keyboard (void); /* Defined in indent.c. */ extern ptrdiff_t current_column (void); extern void invalidate_current_column (void); -extern int indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); +extern bool indented_beyond_p (ptrdiff_t, ptrdiff_t, EMACS_INT); extern void syms_of_indent (void); /* Defined in frame.c. */ @@ -3269,8 +3293,11 @@ extern bool display_arg; extern Lisp_Object decode_env_path (const char *, const char *); extern Lisp_Object empty_unibyte_string, empty_multibyte_string; extern Lisp_Object Qfile_name_handler_alist; -extern _Noreturn void fatal_error_backtrace (int, int); +extern _Noreturn void terminate_due_to_signal (int, int); extern Lisp_Object Qkill_emacs; +#ifdef WINDOWSNT +extern Lisp_Object Vlibrary_cache; +#endif #if HAVE_SETLOCALE void fixup_locale (void); void synchronize_system_messages_locale (void); @@ -3306,7 +3333,7 @@ extern bool running_asynch_code; extern Lisp_Object QCtype, Qlocal; extern Lisp_Object Qprocessp; extern void kill_buffer_processes (Lisp_Object); -extern int wait_reading_process_output (intmax_t, int, int, int, +extern int wait_reading_process_output (intmax_t, int, int, bool, Lisp_Object, struct Lisp_Process *, int); @@ -3407,8 +3434,6 @@ extern void init_sys_modes (struct tty_display_info *); extern void reset_sys_modes (struct tty_display_info *); extern void init_all_sys_modes (void); extern void reset_all_sys_modes (void); -extern void wait_for_termination (pid_t); -extern void interruptible_wait_for_termination (pid_t); extern void flush_pending_output (int) ATTRIBUTE_CONST; extern void child_setup_tty (int); extern void setup_pty (int); @@ -3469,6 +3494,11 @@ extern void syms_of_fontset (void); extern Lisp_Object Qfont_param; #endif +#ifdef WINDOWSNT +/* Defined on w32notify.c. */ +extern void syms_of_w32notify (void); +#endif + /* Defined in xfaces.c. */ extern Lisp_Object Qdefault, Qtool_bar, Qfringe; extern Lisp_Object Qheader_line, Qscroll_bar, Qcursor; @@ -3519,6 +3549,13 @@ extern int have_menus_p (void); void syms_of_dbusbind (void); #endif + +/* Defined in profiler.c. */ +extern bool profiler_memory_running; +extern void malloc_probe (size_t); +extern void syms_of_profiler (void); + + #ifdef DOS_NT /* Defined in msdos.c, w32.c. */ extern char *emacs_root_dir (void); @@ -3528,7 +3565,8 @@ extern char *emacs_root_dir (void); Used during startup to detect startup of dumped Emacs. */ extern bool initialized; -extern int immediate_quit; /* Nonzero means ^G can quit instantly. */ +/* True means ^G can quit instantly. */ +extern bool immediate_quit; extern void *xmalloc (size_t); extern void *xzalloc (size_t);