Mercurial > hg > xemacs-beta
changeset 2500:3d8143fc88e1
[xemacs-hg @ 2005-01-24 23:33:30 by ben]
get working with VC7
config.inc.samp: Declare OPTIONAL_LIBRARY_DIR as root of library directories.
Redo all graphics library defaults to mirror the versions and
directories in the current binary aux distribution on xemacs
web site. Enable TIFF and COMPFACE by default since you can
now compile with them and binary libs are provided.
xemacs.mak: Put our own directories first in case of conflict (e.g. config.h
in compface).
xemacs.mak: Use MSVCRT to avoid link problems.
s/windowsnt.h:
bytecode.c, print.c: Add casts to avoid warning.
compiler.h: Add MSC_VERSION and include definitions of DOESNT_RETURN and
friends here, like for GCC. Need different definitions for VC7
and VC6.
s/windowsnt.h: Remove stuff moved to compiler.h. Disable warning 4646 ("function
declared with __declspec(noreturn) has non-void return type")
on VC7 since lots of Lisp primitives trigger this and there is
no easy way to kludge around the warning.
glyphs-eimage.c: Some really nasty hacks to allow TIFF and JPEG to both be compiled.
#### The better solution is to move the TIFF and JPEG code to
different files.
glyphs-msw.c: Define __STDC__ to avoid problems with compface.h.
intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, syswindows.h: Those wankers at Microsoft cannot leave well enough alone.
Various functions change parameter types semi-randomly between
VC6 and VC7, so we need to include our own versions that
can handle both kinds with appropriate casting.
EmacsFrame.c, EmacsShell-sub.c, EmacsShell.c, alloc.c, alloca.c, buffer.c, bytecode.c, charset.h, chartab.c, cm.c, console-stream.c, console.c, data.c, debug.h, device-msw.c, device-tty.c, device-x.c, doprnt.c, dumper.c, dynarr.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, free-hook.c, gccache-gtk.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, glyphs.c, gtk-glue.c, gutter.c, input-method-xlib.c, insdel.c, intl-win32.c, keymap.c, lisp.h, lread.c, lstream.c, macros.c, malloc.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, mule-coding.c, native-gtk-toolbar.c, number.c, objects-msw.c, objects.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, regex.c, scrollbar-gtk.c, scrollbar-x.c, search.c, select-x.c, signal.c, specifier.c, specifier.h, strftime.c, sunplay.c, symbols.c, sysdep.c, sysproc.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, ui-gtk.c, unexnt.c, unicode.c, win32.c, window.c, xgccache.c, s/windowsnt.h: abort() -> ABORT(). Eliminate preprocessor games with abort()
since it creates huge problems in VC7, solvable only by including
massive amounts of files in every compile (and not worth it).
line wrap: on
line diff
--- a/configure Mon Jan 24 22:51:18 2005 +0000 +++ b/configure Mon Jan 24 23:34:34 2005 +0000 @@ -14658,7 +14658,7 @@ if test "$sound_found" = "yes"; then with_native_sound=yes - if test "$opsys" = "netbsd" ; then + if test "$opsys" = "netbsd" ; then echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c" 1>&6 echo "configure:14665: checking for _oss_ioctl in -lossaudio" >&5
--- a/nt/ChangeLog Mon Jan 24 22:51:18 2005 +0000 +++ b/nt/ChangeLog Mon Jan 24 23:34:34 2005 +0000 @@ -1,3 +1,22 @@ +2005-01-24 Ben Wing <ben@xemacs.org> + + * config.inc.samp: + * config.inc.samp (PNG_DIR): + Declare OPTIONAL_LIBRARY_DIR as root of library directories. + Redo all graphics library defaults to mirror the versions and + directories in the current binary aux distribution on xemacs + web site. Enable TIFF and COMPFACE by default since you can + now compile with them and binary libs are provided. + + * xemacs.mak: + * xemacs.mak (INCLUDES): + Put our own directories first in case of conflict (e.g. config.h + in compface). + + * xemacs.mak ($(BLDLIB_SRC)/minitar.exe): + * xemacs.mak (LIB_SRC_TOOLS): + Use MSVCRT to avoid link problems. + 2004-11-07 Ben Wing <ben@xemacs.org> * xemacs.mak (INTERNALS_SRCS):
--- a/nt/config.inc.samp Mon Jan 24 22:51:18 2005 +0000 +++ b/nt/config.inc.samp Mon Jan 24 23:34:34 2005 +0000 @@ -26,38 +26,49 @@ # Compiled-in features: graphics formats # ############################################################################ +# Directory under which the optional libraries are placed. To make your +# life easy, just grab http://ftp.xemacs.org/aux/optional-libs.exe +# (a self-installing .ZIP) and unzip them into an appropriate directory +# (by default, c:\src). This gets you precompiled versions of all of +# the libraries below. +OPTIONAL_LIBRARY_DIR=c:\src + # Set this to enable XPM support (virtually mandatory), and specify # the directory containing xpm. Get the library from # http://ftp.xemacs.org/aux/xpm-3.4k.tar.gz. HAVE_XPM=1 -XPM_DIR=c:\src\xpm-3.4k +XPM_DIR=$(OPTIONAL_LIBRARY_DIR)\xpm-3.4k # Set this to enable GIF support (built-in). HAVE_GIF=1 # Set this to enable PNG support (virtually mandatory), and specify # the directories containing png and zlib. Get the latest version from -# ftp://ftp.uu.net/graphics/png/. You will have to rename the zlib directory -# from zlib-1.1.4 or whatever to just `zlib' for the build to work. +# ftp://ftp.uu.net/graphics/png/. NOTE: In order to compile libpng, +# you will have to rename the zlib directory to just `zlib'. We don't +# do that here so we can preserve the version number, like for the other +# libraries. HAVE_PNG=1 -PNG_DIR=c:\src\libpng-1.2.5 -ZLIB_DIR=c:\src\zlib +PNG_DIR=$(OPTIONAL_LIBRARY_DIR)\libpng-1.2.8 +ZLIB_DIR=$(OPTIONAL_LIBRARY_DIR)\zlib-1.2.1 -# Set this to enable TIFF support, and specify the directory containing tiff. -# Get the latest version from ftp://ftp.uu.net/graphics/tiff/. Not on by -# default since TIFF isn't really very important. -HAVE_TIFF=0 -TIFF_DIR=c:\src\tiff-v3.5.7 +# Set this to enable JPEG support (useful, but not necessary), and specify +# the directory containing jpeg. Get the latest version from +# ftp://ftp.uu.net/graphics/jpeg/. +HAVE_JPEG=1 +JPEG_DIR=$(OPTIONAL_LIBRARY_DIR)\jpeg-6b -# Set this to enable JPEG support, and specify the directory containing jpeg. -# Get the latest version from ftp://ftp.uu.net/graphics/jpeg/. -HAVE_JPEG=1 -JPEG_DIR=c:\src\jpeg-6b +# Set this to enable TIFF support (not very important), and specify the +# directory containing tiff. Get the latest version from +# ftp://ftp.uu.net/graphics/tiff/. +HAVE_TIFF=1 +TIFF_DIR=$(OPTIONAL_LIBRARY_DIR)\tiff-v3.5.7 -# Set this to enable XFace support, and specify the directory containing -# compface. Get the library from http://ftp.xemacs.org/aux/compface.tar.gz. -HAVE_XFACE=0 -COMPFACE_DIR= +# Set this to enable XFace support (not very important), and specify the +# directory containing compface. Get the library from +# http://ftp.xemacs.org/aux/compface-1.5.tar.gz. +HAVE_XFACE=1 +COMPFACE_DIR=$(OPTIONAL_LIBRARY_DIR)\compface-1.5 ############################################################################ # Build settings #
--- a/nt/xemacs.mak Mon Jan 24 22:51:18 2005 +0000 +++ b/nt/xemacs.mak Mon Jan 24 23:34:34 2005 +0000 @@ -1,7 +1,7 @@ # Makefile for Microsoft NMAKE -*- Makefile -*- # # Copyright (C) 1995 Board of Trustees, University of Illinois. -# Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing. +# Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004 Ben Wing. # Copyright (C) 1997, 1998, 2000 Jonathan Harris. # Copyright (C) 1995 Sun Microsystems, Inc. # Copyright (C) 1998 Free Software Foundation, Inc. @@ -206,6 +206,11 @@ # A little bit of adhockery. Default to use system malloc and # DLL version of the C runtime library when using portable # dumping. These are the optimal settings. +# +# NOTE: The various graphics libraries are generally compiled to use +# MSVCRT.DLL (the same that we use in USE_CRTDLL, more or less), so using +# this is a good thing. + !if !defined(USE_SYSTEM_MALLOC) USE_SYSTEM_MALLOC=$(USE_PORTABLE_DUMPER) !endif @@ -597,7 +602,7 @@ ########################### Determine generic includes/defines/flags. -INCLUDES=$(MSW_INCLUDES) -I$(NT)\inc -I$(SRC) +INCLUDES=-I$(NT)\inc -I$(SRC) $(MSW_INCLUDES) DEFINES=$(MSW_DEFINES) $(MULE_DEFINES) $(UNION_DEFINES) \ $(DUMPER_DEFINES) $(KKCC_DEFINES) $(MALLOC_DEFINES) \ @@ -906,7 +911,7 @@ # Minitar uses zlib so just use cdecl to simplify things $(BLDLIB_SRC)/minitar.exe : $(NT)/minitar.c - $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) $(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib" + $(CCV) -I"$(ZLIB_DIR)" $(LIB_SRC_DEFINES) $(CFLAGS_CDECL_NO_LIB) -MD $(LINK_DEPENDENCY_ARGS) "$(ZLIB_DIR)\zlib.lib" LIB_SRC_TOOLS = \ $(BLDLIB_SRC)/etags.exe \
--- a/src/ChangeLog Mon Jan 24 22:51:18 2005 +0000 +++ b/src/ChangeLog Mon Jan 24 23:34:34 2005 +0000 @@ -1,3 +1,334 @@ +2005-01-24 Ben Wing <ben@xemacs.org> + + * s/windowsnt.h: + +2005-01-24 Ben Wing <ben@xemacs.org> + + * bytecode.c (optimize_compiled_function): + * print.c (ONE_DIGIT): + Add casts to avoid warning. + + * compiler.h: + Add MSC_VERSION and include definitions of DOESNT_RETURN and + friends here, like for GCC. Need different definitions for VC7 + and VC6. + + * s/windowsnt.h: + Remove stuff moved to compiler.h. Disable warning 4646 ("function + declared with __declspec(noreturn) has non-void return type") + on VC7 since lots of Lisp primitives trigger this and there is + no easy way to kludge around the warning. + + * glyphs-eimage.c: + Some really nasty hacks to allow TIFF and JPEG to both be compiled. + #### The better solution is to move the TIFF and JPEG code to + different files. + + * glyphs-msw.c (mswindows_xbm_instantiate): + Define __STDC__ to avoid problems with compface.h. + + * intl-auto-encap-win32.c (qxeImmGetCandidateListCount): + * intl-auto-encap-win32.c (qxeFindResourceEx): + * intl-auto-encap-win32.h: + * intl-encap-win32.c: + * intl-encap-win32.c (qxeImmGetCompositionFont): + * syswindows.h: + Those wankers at Microsoft cannot leave well enough alone. + Various functions change parameter types semi-randomly between + VC6 and VC7, so we need to include our own versions that + can handle both kinds with appropriate casting. + + * EmacsFrame.c (EmacsFrameRecomputeCellSize): + * EmacsShell-sub.c: + * EmacsShell-sub.c (ABORT): + * EmacsShell-sub.c (SuperClassRootGeometryManager): + * EmacsShell-sub.c (RootGeometryManager): + * EmacsShell.c: + * EmacsShell.c (ABORT): + * EmacsShell.c (EmacsShellUpdateSizeHints): + * alloc.c: + * alloc.c (very_old_free_lcrecord): + * alloc.c (lispdesc_indirect_count_1): + * alloc.c (lispdesc_one_description_line_size): + * alloc.c (lispdesc_block_size_1): + * alloc.c (kkcc_marking): + * alloca.c (i00afunc): + * buffer.c (delete_from_buffer_alist): + * buffer.c (MARKED_SLOT): + * bytecode.c (execute_rare_opcode): + * bytecode.c (optimize_byte_code): + * bytecode.c (Ffetch_bytecode): + * charset.h: + * chartab.c (char_table_type_to_symbol): + * chartab.c (decode_char_table_range): + * chartab.c (encode_char_table_range): + * chartab.c (Freset_char_table): + * chartab.c (get_range_char_table_1): + * chartab.c (check_valid_char_table_value): + * chartab.c (map_char_table): + * chartab.c (chartab_instantiate): + * cm.c (cmcheckmagic): + * console-stream.c (stream_window_output_begin): + * console-stream.c (stream_window_output_end): + * console-stream.c (stream_frame_output_begin): + * console-stream.c (stream_frame_output_end): + * console-stream.c (stream_output_display_block): + * console-stream.c (stream_clear_region): + * console.c (get_console_variant): + * console.c (MARKED_SLOT): + * data.c (finish_marking_weak_lists): + * data.c (encode_weak_list_type): + * debug.h (DASSERT): + * device-msw.c (mswindows_get_default_margin): + * device-tty.c (tty_init_device): + * device-x.c (get_device_from_display): + * device-x.c (x_get_visual_depth): + * doprnt.c (parse_doprnt_spec): + * doprnt.c (get_doprnt_args): + * dumper.c (pdump_unsupported_dump_type): + * dumper.c (pdump_bump_depth): + * dynarr.c (stack_like_free): + * elhash.c (print_hash_table): + * elhash.c (make_standard_lisp_hash_table): + * elhash.c (hash_table_instantiate): + * emacs.c: + * emacs.c (sort_args): + * emacs.c (main): + * emacs.c (Fforce_debugging_signal): + * emacs.c (assert_failed): + * eval.c (throw_or_bomb_out): + * eval.c (Fsignal): + * eval.c (vars_of_eval): + * event-Xt.c (emacs_Xt_mapping_action): + * event-Xt.c (Xt_process_to_emacs_event): + * event-gtk.c (gtk_process_to_emacs_event): + * event-msw.c (mswindows_need_event): + * event-msw.c (mswindows_wnd_proc): + * event-msw.c (emacs_mswindows_format_magic_event): + * event-stream.c (Fadd_timeout): + * event-stream.c (Fadd_async_timeout): + * event-stream.c (execute_internal_event): + * event-stream.c (Frecent_keys): + * event-stream.c (extract_this_command_keys_nth_mouse_event): + * event-stream.c (lookup_command_event): + * events.c (mark_event): + * events.c (event_equal): + * events.c (event_hash): + * events.c (Fmake_event): + * events.c (Fdeallocate_event): + * events.c (event_chain_find_previous): + * events.c (event_to_character): + * events.c (format_event_object): + * events.c (Fevent_type): + * events.c (event_pixel_translation): + * events.c (Fevent_properties): + * extents.c (extent_in_region_p): + * extents.c (print_extent): + * extents.c (process_extents_for_insertion_mapper): + * extents.c (glyph_layout_to_symbol): + * faces.c (face_validate): + * file-coding.c (eol_type_to_symbol): + * file-coding.c (subsidiary_coding_system): + * file-coding.c (chain_conversion_end_type): + * file-coding.c (convert_eol_print): + * file-coding.c (convert_eol_getprop): + * file-coding.c (convert_eol_canonicalize_after_coding): + * file-coding.c (coding_category_id_to_symbol): + * file-coding.c (detection_result_number_to_symbol): + * fileio.c: + * fns.c (concat): + * fns.c (Fsubseq): + * fns.c (mapcar1): + * fns.c (Fbase64_encode_region): + * fns.c (Fbase64_encode_string): + * fns.c (Fbase64_decode_region): + * fns.c (Fbase64_decode_string): + * font-lock.c (find_context): + * font-lock.c (context_to_symbol): + * frame-gtk.c (gtk_set_frame_pointer): + * frame-gtk.c (gtk_update_frame_external_traits): + * frame-x.c (x_wm_mark_shell_size_user_specified): + * frame-x.c (x_wm_mark_shell_position_user_specified): + * frame-x.c (x_wm_set_shell_iconic_p): + * frame-x.c (x_wm_set_cell_size): + * frame-x.c (x_wm_set_variable_size): + * frame-x.c (x_wm_store_class_hints): + * frame-x.c (x_wm_maybe_store_wm_command): + * frame-x.c (x_initialize_frame_size): + * frame-x.c (x_update_frame_external_traits): + * frame.c: + * frame.c (delete_frame_internal): + * frame.c (mouse_pixel_position_1): + * frame.c (change_frame_size_1): + * free-hook.c (check_free): + * free-hook.c (check_realloc): + * free-hook.c (note_block_input): + * free-hook.c (log_gcpro): + * gccache-gtk.c (gc_cache_lookup): + * glyphs-eimage.c (tiff_memory_write): + * glyphs-gtk.c (gtk_finalize_image_instance): + * glyphs-gtk.c (init_image_instance_from_gdk_pixmap): + * glyphs-gtk.c (init_image_instance_from_xbm_inline): + * glyphs-gtk.c (gtk_xpm_instantiate): + * glyphs-gtk.c (gtk_unmap_subwindow): + * glyphs-gtk.c (gtk_map_subwindow): + * glyphs-gtk.c (gtk_button_redisplay): + * glyphs-msw.c: + * glyphs-msw.c (init_image_instance_from_xbm_inline): + * glyphs-x.c (init_image_instance_from_xbm_inline): + * glyphs-x.c (extract_xpm_color_names): + * glyphs-x.c (x_xpm_instantiate): + * glyphs.c (get_image_instantiator_governing_domain): + * glyphs.c (print_image_instance): + * glyphs.c (image_instance_equal): + * glyphs.c (image_instance_hash): + * glyphs.c (encode_image_instance_type): + * glyphs.c (inherit_instantiate): + * glyphs.c (image_instantiate): + * glyphs.c (allocate_glyph): + * glyphs.c (Fglyph_type): + * glyphs.c (display_table_entry): + * gtk-glue.c (xemacs_list_to_gtklist): + * gtk-glue.c (xemacs_gtklist_to_list): + * gtk-glue.c (xemacs_list_to_array): + * gutter.c (SET_GUTTER_WAS_VISIBLE_FLAG): + * gutter.c (gutter_was_visible): + * gutter.c (get_gutter_coords): + * input-method-xlib.c (get_XIM_input): + * insdel.c (move_gap): + * intl-win32.c (determine_code_page): + * intl-win32.c (mswindows_multibyte_to_unicode_getprop): + * intl-win32.c (mswindows_multibyte_convert): + * keymap.c (keymap_lookup_directly): + * keymap.c (keymap_delete_inverse_internal): + * keymap.c (ensure_meta_prefix_char_keymapp): + * keymap.c (accessible_keymaps_mapper_1): + * keymap.c (where_is_recursive_mapper): + * lisp.h: + * lisp.h (ABORT): + * lisp.h (assert): + * lread.c (read_atom): + * lstream.c (Lstream_delete): + * lstream.c (Lstream_really_write): + * lstream.c (make_lisp_buffer_stream_1): + * macros.c (pop_kbd_macro_event): + * malloc.c (malloc): + * malloc.c (free): + * menubar-gtk.c (menu_descriptor_to_widget_1): + * menubar-gtk.c (menu_create_menubar): + * menubar-msw.c (prune_menubar): + * menubar-x.c (set_frame_menubar): + * mule-coding.c (charset_by_attributes_or_create_one): + * mule-coding.c (parse_iso2022_esc): + * mule-coding.c (iso2022_encode): + * native-gtk-toolbar.c (SET_TOOLBAR_WAS_VISIBLE_FLAG): + * number.c: + * number.c (get_number_type): + * objects-msw.c (mswindows_list_fonts): + * objects.c (color_instantiate): + * objects.c (font_instantiate): + * objects.c (face_boolean_instantiate): + * print.c (printing_major_badness): + * process-nt.c (nt_send_process): + * process-unix.c (unix_send_process): + * process.c (get_process): + * ralloc.c (obtain): + * ralloc.c (relinquish): + * ralloc.c (relocate_blocs): + * ralloc.c (resize_bloc): + * ralloc.c (r_alloc_free): + * ralloc.c (r_re_alloc): + * ralloc.c (r_alloc_thaw): + * ralloc.c (init_ralloc): + * ralloc.c (Free_Addr_Block): + * ralloc.c (r_alloc): + * rangetab.c (range_table_type_to_symbol): + * rangetab.c (print_range_table): + * rangetab.c (rangetab_instantiate): + * redisplay-gtk.c (gtk_output_display_block): + * redisplay-msw.c (mswindows_output_display_block): + * redisplay-output.c (get_next_display_block): + * redisplay-output.c (get_cursor_size_and_location): + * redisplay-output.c (redisplay_output_layout): + * redisplay-output.c (redisplay_clear_region): + * redisplay-tty.c (tty_output_display_block): + * redisplay-x.c (x_output_display_block): + * redisplay.c (add_propagation_runes): + * redisplay.c (add_glyph_rune): + * redisplay.c (add_margin_runes): + * redisplay.c (create_left_glyph_block): + * redisplay.c (create_right_glyph_block): + * redisplay.c (regenerate_window): + * redisplay.c (REGEN_INC_FIND_START_END): + * redisplay.c (point_in_line_start_cache): + * regex.c: + * regex.c (ABORT): + * regex.c (re_compile_fastmap): + * regex.c (re_match_2_internal): + * regex.c (regerror): + * scrollbar-gtk.c (gtk_scrollbar_loop): + * scrollbar-gtk.c (scrollbar_cb): + * scrollbar-x.c (x_update_scrollbar_instance_status): + * scrollbar-x.c (x_scrollbar_loop): + * search.c (search_command): + * search.c (Fmatch_data): + * select-x.c (motif_clipboard_cb): + * signal.c: + * signal.c (qxe_setitimer): + * signal.c (interrupt_signal): + * specifier.c (specifier_add_spec): + * specifier.c (specifier_instance): + * specifier.h: + * strftime.c (add_num_time_t): + * sunplay.c (init_device): + * symbols.c (do_symval_forwarding): + * symbols.c (store_symval_forwarding): + * symbols.c (Fset): + * symbols.c (Fbuilt_in_variable_type): + * symbols.c (handler_type_from_function_symbol): + * sysdep.c (init_baud_rate): + * sysproc.h: + * text.c: + * text.c (charbpos_to_bytebpos_func): + * text.c (bytebpos_to_charbpos_func): + * text.c (new_dfc_convert_now_damn_it): + * text.h: + * toolbar-common.c (__INTERNAL_MAPPED_P): + * toolbar-common.c (SET_TOOLBAR_WAS_VISIBLE_FLAG): + * toolbar-msw.c (SET_TOOLBAR_WAS_VISIBLE_FLAG): + * toolbar.c (get_toolbar_coords): + * ui-gtk.c (build_gtk_boxed): + * ui-gtk.c (describe_gtk_arg): + * ui-gtk.c (gtk_type_to_lisp): + * ui-gtk.c (lisp_to_gtk_type): + * ui-gtk.c (lisp_to_gtk_ret_type): + * ui-gtk.c (lisp_to_flag): + * unexnt.c (read_in_bss): + * unexnt.c (map_in_heap): + * unicode.c: + * unicode.c (create_new_from_unicode_table): + * unicode.c (sledgehammer_check_from_table): + * unicode.c (sledgehammer_check_to_table): + * unicode.c (set_unicode_conversion): + * unicode.c (unicode_to_ichar): + * unicode.c (encode_unicode_char_1): + * unicode.c (unicode_convert): + * unicode.c (unicode_getprop): + * win32.c (mswindows_lisp_error_1): + * window.c (real_window): + * window.c (window_display_lines): + * window.c (window_display_buffer): + * window.c (set_window_display_buffer): + * window.c (unshow_buffer): + * window.c (window_loop): + * window.c (Fget_lru_window): + * xgccache.c (gc_cache_lookup): + * s/windowsnt.h: + + abort() -> ABORT(). Eliminate preprocessor games with abort() + since it creates huge problems in VC7, solvable only by including + massive amounts of files in every compile (and not worth it). + 2005-01-21 Robert Royar <xemacs@frinabulax.org> * database.c: Repair typo in NetBSD fix.
--- a/src/EmacsFrame.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/EmacsFrame.c Mon Jan 24 23:34:34 2005 +0000 @@ -610,7 +610,7 @@ struct frame *f = ew->emacs_frame.frame; if (! XtIsSubclass (w, emacsFrameClass)) - abort (); + ABORT (); default_face_height_and_width (wrap_frame (f), &ch, &cw); if (FRAME_X_TOP_LEVEL_FRAME_P (f))
--- a/src/EmacsShell-sub.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/EmacsShell-sub.c Mon Jan 24 23:34:34 2005 +0000 @@ -90,6 +90,8 @@ #include <X11/VendorP.h> #include "EmacsShellP.h" +#define ABORT abort + #if defined (DEFINE_TOP_LEVEL_EMACS_SHELL) #define EMACS_SHELL_WIDGET TopLevelEmacsShellWidget #define SUPERCLASS_WIDGET_CLASS topLevelShellWidgetClass @@ -286,7 +288,7 @@ } if (!gcer) - abort (); + ABORT (); /* call it to actually make the geometry request */ scer = (ShellClassExtensionRec *) gcer; @@ -304,7 +306,7 @@ XtGeometryResult result; if (reentrant) - abort (); + ABORT (); reentrant++; #ifdef DEBUG_GEOMETRY_MANAGEMENT
--- a/src/EmacsShell.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/EmacsShell.c Mon Jan 24 23:34:34 2005 +0000 @@ -34,6 +34,8 @@ #include "EmacsShell.h" #include "ExternalShell.h" +#define ABORT abort + #if 0 /* Not currently used */ /* The root_geometry_manager() method in Shell.c is fucked up with regard @@ -161,5 +163,5 @@ else if (XtIsSubclass (gw, transientEmacsShellWidgetClass)) TransientEmacsShellUpdateSizeHints (gw); else - abort (); + ABORT (); }
--- a/src/alloc.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/alloc.c Mon Jan 24 23:34:34 2005 +0000 @@ -552,7 +552,7 @@ break; } else if (next == 0) - abort (); + ABORT (); else header = next; } @@ -3096,7 +3096,7 @@ pdump_backtrace (); #endif count = 0; /* warning suppression */ - abort (); + ABORT (); } count += delta; return count; @@ -3218,7 +3218,7 @@ return sizeof (long); default: stderr_out ("Unsupported dump type : %d\n", desc1->type); - abort (); + ABORT (); } return 0; @@ -3260,7 +3260,7 @@ if (offset == max_offset) { stderr_out ("Two relocatable elements at same offset?\n"); - abort (); + ABORT (); } else if (offset > max_offset) { @@ -3545,7 +3545,7 @@ default: stderr_out ("Unsupported description type : %d\n", desc1->type); - abort (); + ABORT (); } } } @@ -3568,7 +3568,7 @@ /* this code should never be reached when configured for KKCC */ stderr_out ("KKCC: Invalid mark_object call.\n"); stderr_out ("Replace mark_object with kkcc_gc_stack_push_lisp_object.\n"); - abort (); + ABORT (); #else /* not USE_KKCC */ tail_recurse:
--- a/src/alloca.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/alloca.c Mon Jan 24 23:34:34 2005 +0000 @@ -339,7 +339,7 @@ a fatal error if "trailer" is null. */ if (trailer == 0) - abort (); + ABORT (); /* Discard segments that do not contain our argument address. */ @@ -348,7 +348,7 @@ block = (long *) trailer->this_address; size = trailer->this_size; if (block == 0 || size == 0) - abort (); + ABORT (); trailer = (struct stk_trailer *) trailer->link; if ((block <= address) && (address < (block + size))) break; @@ -367,7 +367,7 @@ do { if (trailer->this_size <= 0) - abort (); + ABORT (); result += trailer->this_size; trailer = (struct stk_trailer *) trailer->link; }
--- a/src/buffer.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/buffer.c Mon Jan 24 23:34:34 2005 +0000 @@ -559,7 +559,7 @@ Lisp_Object cons = Frassq (buf, Vbuffer_alist); Lisp_Object frmcons, devcons, concons; if (NILP (cons)) - return; /* abort() ? */ + return; /* ABORT() ? */ Vbuffer_alist = delq_no_quit (cons, Vbuffer_alist); FRAME_LOOP_NO_BREAK (frmcons, devcons, concons) @@ -2819,7 +2819,7 @@ if ((XINT (buffer_local_flags.slot) != -2 && \ XINT (buffer_local_flags.slot) != -3) \ != !(NILP (XBUFFER (Vbuffer_local_symbols)->slot))) \ - abort (); + ABORT (); #include "bufslots.h" {
--- a/src/bytecode.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/bytecode.c Mon Jan 24 23:34:34 2005 +0000 @@ -1602,7 +1602,7 @@ } default: - abort(); + ABORT(); break; } return stack_ptr; @@ -1973,7 +1973,7 @@ break; default: - abort(); + ABORT(); break; } } @@ -2049,7 +2049,8 @@ program = alloca_array (Opbyte, 1 + 2 * XSTRING_LENGTH (f->instructions)); optimize_byte_code (f->instructions, f->constants, program, &program_length, &varbind_count); - f->specpdl_depth = XINT (Flength (f->arglist)) + varbind_count; + f->specpdl_depth = (unsigned short) (XINT (Flength (f->arglist)) + + varbind_count); f->instructions = make_opaque (program, program_length * sizeof (Opbyte)); } @@ -2514,7 +2515,7 @@ f->constants = XCDR (tem); return function; } - abort (); + ABORT (); return Qnil; /* not (usually) reached */ }
--- a/src/charset.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/charset.h Mon Jan 24 23:34:34 2005 +0000 @@ -428,7 +428,7 @@ #ifdef ENABLE_COMPOSITE_CHARS return LEADING_BYTE_COMPOSITE; #else - abort(); + ABORT(); return 0; #endif /* ENABLE_COMPOSITE_CHARS */ } @@ -452,7 +452,7 @@ #ifdef ENABLE_COMPOSITE_CHARS #error Not yet implemented #else - abort(); + ABORT(); return 0; #endif /* ENABLE_COMPOSITE_CHARS */ }
--- a/src/chartab.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/chartab.c Mon Jan 24 23:34:34 2005 +0000 @@ -195,7 +195,7 @@ { switch (type) { - default: abort(); + default: ABORT(); case CHAR_TABLE_TYPE_GENERIC: return Qgeneric; case CHAR_TABLE_TYPE_SYNTAX: return Qsyntax; case CHAR_TABLE_TYPE_DISPLAY: return Qdisplay; @@ -261,7 +261,7 @@ check_int_range (outrange->row, 32, 127); break; default: - abort (); + ABORT (); } } else @@ -294,7 +294,7 @@ case CHARTAB_RANGE_CHAR: return make_char (range->ch); default: - abort (); + ABORT (); } return Qnil; /* not reached */ } @@ -514,7 +514,7 @@ break; default: - abort (); + ABORT (); def = Qnil; break; } @@ -877,7 +877,7 @@ #endif /* not MULE */ default: - abort (); + ABORT (); } if (UNBOUNDP (retval)) @@ -972,7 +972,7 @@ break; default: - abort (); + ABORT (); } return 0; /* not (usually) reached */ @@ -1426,7 +1426,7 @@ } default: - abort (); + ABORT (); } return 0; @@ -1561,7 +1561,7 @@ Fput_char_table (make_char (i), val, chartab); } else - abort (); + ABORT (); } else Fput_char_table (range, val, chartab);
--- a/src/cm.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/cm.c Mon Jan 24 23:34:34 2005 +0000 @@ -101,7 +101,7 @@ if (curX == FrameCols) { if (!MagicWrap || curY >= FrameRows - 1) - abort (); + ABORT (); if (termscript) putc ('\r', termscript); putchar ('\r');
--- a/src/compiler.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/compiler.h Mon Jan 24 23:34:34 2005 +0000 @@ -99,6 +99,12 @@ # endif /* __GNUC__ */ #endif /* GCC_VERSION */ +#ifdef _MSC_VER +#define MSC_VERSION _MSC_VER +#else +#define MSC_VERSION 0 +#endif + /* GCC < 2.6.0 could only declare one attribute per function. In that case, we define DOESNT_RETURN in preference to PRINTF_ARGS, which is only used for checking args against the string spec. */ @@ -124,7 +130,17 @@ # define DOESNT_RETURN_TYPE(rettype) rettype volatile # define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) rettype volatile decl # endif /* GCC_VERSION >= NEED_GCC (2, 5, 0) */ -# else /* not gcc */ +# elif (MSC_VERSION >= 1200) +/* MSVC 6.0 has a mechanism to declare functions which never return */ +# define DOESNT_RETURN_TYPE(rettype) __declspec(noreturn) rettype +# define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) \ + __declspec(noreturn) rettype XCDECL decl +# if (MSC_VERSION >= 1300) +/* VC++ 7 issues warnings about return statements in __declspec(noreturn) + functions; this problem didn't exist under VC++ 6 */ +# define RETURN_NOT_REACHED(value) DO_NOTHING +# endif +# else /* not gcc, VC++ */ # define DOESNT_RETURN_TYPE(rettype) rettype # define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) rettype decl # endif /* GCC_VERSION > NEED_GCC (0, 0, 0) */ @@ -145,8 +161,8 @@ /* More ways to shut up compiler. This works in Fcommand_loop_1(), where there's an infinite loop in a function returning a Lisp object. */ -#if defined (_MSC_VER) || defined (__SUNPRO_C) || defined (__SUNPRO_CC) || \ - (defined (DEC_ALPHA) && defined (OSF1)) +#if (defined (_MSC_VER) && MSC_VERSION < 1300) || defined (__SUNPRO_C) || \ + defined (__SUNPRO_CC) || (defined (DEC_ALPHA) && defined (OSF1)) # define DO_NOTHING_DISABLING_NO_RETURN_WARNINGS if (0) return Qnil #else # define DO_NOTHING_DISABLING_NO_RETURN_WARNINGS DO_NOTHING
--- a/src/console-stream.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/console-stream.c Mon Jan 24 23:34:34 2005 +0000 @@ -227,25 +227,25 @@ static void stream_window_output_begin (struct window *UNUSED (w)) { - abort (); + ABORT (); } static void stream_window_output_end (struct window *UNUSED (w)) { - abort (); + ABORT (); } static void stream_frame_output_begin (struct frame *UNUSED (f)) { - abort (); + ABORT (); } static void stream_frame_output_end (struct frame *UNUSED (f)) { - abort (); + ABORT (); } static void @@ -257,7 +257,7 @@ int UNUSED (cursor_width), int UNUSED (cursor_height)) { - abort (); + ABORT (); } static void @@ -268,7 +268,7 @@ Lisp_Object UNUSED (bcolor), Lisp_Object UNUSED (background_pixmap)) { - abort (); + ABORT (); } static int
--- a/src/console.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/console.c Mon Jan 24 23:34:34 2005 +0000 @@ -260,7 +260,7 @@ if (EQ (type, Qstream)) return stream_console; - abort (); /* should never happen */ + ABORT (); /* should never happen */ return dead_console; } @@ -1564,6 +1564,6 @@ if ((XINT (console_local_flags.slot) != -2 && \ XINT (console_local_flags.slot) != -3) \ != !(NILP (XCONSOLE (Vconsole_local_symbols)->slot))) \ - abort (); + ABORT (); #include "conslots.h" }
--- a/src/data.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/data.c Mon Jan 24 23:34:34 2005 +0000 @@ -2733,7 +2733,7 @@ break; default: - abort (); + ABORT (); } if (need_to_mark_elem && ! marked_p (elem)) @@ -2897,7 +2897,7 @@ case WEAK_LIST_VALUE_ASSOC: return Qvalue_assoc; case WEAK_LIST_FULL_ASSOC: return Qfull_assoc; default: - abort (); + ABORT (); } return Qnil; /* not (usually) reached */
--- a/src/debug.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/debug.h Mon Jan 24 23:34:34 2005 +0000 @@ -64,7 +64,7 @@ stderr_out ("Assertion failed in %s at line %d\n", \ __FILE__, __LINE__); \ else \ - abort (); \ + ABORT (); \ } \ } \ } while (0)
--- a/src/device-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/device-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -848,7 +848,7 @@ if (EQ (prop, Qright_margin)) return 1440; if (EQ (prop, Qtop_margin)) return 720; if (EQ (prop, Qbottom_margin)) return 720; - abort (); + ABORT (); return 0; }
--- a/src/device-tty.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/device-tty.c Mon Jan 24 23:34:34 2005 +0000 @@ -87,7 +87,7 @@ case TTY_INIT_SUCCESS: break; default: - abort (); + ABORT (); } init_one_device (d);
--- a/src/device-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/device-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -157,7 +157,7 @@ (STRINGP (Vinvocation_name) ? (char *) XSTRING_DATA (Vinvocation_name) : FALLBACK_RESOURCE_NAME), DisplayString (dpy) ? DisplayString (dpy) : "???"); - abort(); + ABORT(); } #undef FALLBACK_RESOURCE_NAME @@ -456,7 +456,7 @@ vi_in.visualid = XVisualIDFromVisual (visual); vi_out = XGetVisualInfo (dpy, /*VisualScreenMask|*/VisualIDMask, &vi_in, &out_count); - if (! vi_out) abort (); + if (! vi_out) ABORT (); d = vi_out [0].depth; XFree ((char *) vi_out); return d;
--- a/src/doprnt.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/doprnt.c Mon Jan 24 23:34:34 2005 +0000 @@ -239,7 +239,7 @@ case ' ': spec.space_flag = 1; break; case '#': spec.number_flag = 1; break; case '0': spec.zero_flag = 1; break; - default: abort (); + default: ABORT (); } NEXT_ASCII_BYTE (ch); } @@ -408,7 +408,7 @@ else if (strchr (bigfloat_converters, ch)) arg.obj = va_arg (vargs, Lisp_Object); #endif - else abort (); + else ABORT (); Dynarr_add (args, arg); }
--- a/src/dumper.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/dumper.c Mon Jan 24 23:34:34 2005 +0000 @@ -490,7 +490,7 @@ #endif if (do_backtrace) pdump_backtrace (); - abort (); + ABORT (); } static void @@ -500,7 +500,7 @@ if (me > 65536) { stderr_out ("Backtrace overflow, loop ?\n"); - abort (); + ABORT (); } backtrace[me].obj = 0; backtrace[me].position = 0;
--- a/src/dynarr.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/dynarr.c Mon Jan 24 23:34:34 2005 +0000 @@ -335,6 +335,6 @@ return; } - abort (); + ABORT (); } }
--- a/src/elhash.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/elhash.c Mon Jan 24 23:34:34 2005 +0000 @@ -374,7 +374,7 @@ else if (ht->test_function == lisp_object_eql_equal) DO_NOTHING; else - abort (); + ABORT (); if (ht->count || !print_readably) { @@ -533,7 +533,7 @@ break; default: - abort (); + ABORT (); } return make_general_lisp_hash_table (hash_function, test_function, @@ -798,7 +798,7 @@ else if (EQ (key, Qdata)) data = value; else if (EQ (key, Qtype))/*obsolete*/ weakness = value; else - abort (); + ABORT (); } /* Create the hash table. */
--- a/src/emacs.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/emacs.c Mon Jan 24 23:34:34 2005 +0000 @@ -2762,7 +2762,7 @@ } if (best < 0) - abort (); + ABORT (); /* Copy the highest priority remaining option, with its args, to NEW_ARGV. */ @@ -3027,7 +3027,7 @@ if (rc != 0) { stderr_out ("malloc_set_state failed, rc = %d\n", rc); - abort (); + ABORT (); } #if 0 free (malloc_state_ptr); @@ -3261,7 +3261,7 @@ Cause XEmacs to enter the debugger. On some systems, there may be no way to do this gracefully; if so, nothing happens unless ABORT is non-nil, in which case XEmacs will -abort() -- a sure-fire way to immediately get back to the debugger, +ABORT() -- a sure-fire way to immediately get back to the debugger, but also a sure-fire way to kill XEmacs (and dump core on Unix systems)! */ @@ -3269,7 +3269,7 @@ { debugging_breakpoint (); if (!NILP (abort_)) - abort (); + ABORT (); return Qnil; } @@ -3761,7 +3761,7 @@ #undef fprintf #endif -/* This is called when an assert() fails or when abort() is called -- both +/* This is called when an assert() fails or when ABORT() is called -- both of those are defined in the preprocessor to an expansion involving assert_failed(). */ void @@ -4497,10 +4497,6 @@ #endif -#undef abort /* Get access to the real version of abort. We put this all - the way at the end to make sure that all calls to abort() - anywhere in the above code go through assert_failed(). */ - DOESNT_RETURN really_abort (void) {
--- a/src/eval.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/eval.c Mon Jan 24 23:34:34 2005 +0000 @@ -1642,7 +1642,7 @@ #ifdef DEFEND_AGAINST_THROW_RECURSION /* die if we recurse more than is reasonable */ if (++throw_level > 20) - abort (); + ABORT (); #endif #ifdef ERROR_CHECK_TRAPPING_PROBLEMS @@ -2228,7 +2228,7 @@ /* who knows how much has been initialized? Safest bet is just to bomb out immediately. */ stderr_out ("Error before initialization is complete!\n"); - abort (); + ABORT (); } assert (!gc_in_progress); @@ -6544,7 +6544,7 @@ t each time a Control-G is detected, and to `critical' each time a Shift-Control-G is detected. The XEmacs core C code is littered with calls to the QUIT; macro, which check the values of `quit-flag' and -`inhibit-quit' and abort (or more accurately, call (signal 'quit)) if +`inhibit-quit' and ABORT (or more accurately, call (signal 'quit)) if it's correct to do so. */ ); Vquit_flag = Qnil; @@ -6607,7 +6607,7 @@ \(force-debugging-signal t). This is useful because debugging noninteractive runs of XEmacs is often very difficult, since they typically happen as part of sometimes large and complex make suites (e.g. rebuilding -the XEmacs packages). NOTE: This runs abort()!!! (As well as and after +the XEmacs packages). NOTE: This runs ABORT()!!! (As well as and after executing INT 3 under MS Windows, which should invoke a debugger if it's active.) This is guaranteed to kill XEmacs! (But in this situation, XEmacs is about to die anyway, and if no debugger is present, this will usefully
--- a/src/event-Xt.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/event-Xt.c Mon Jan 24 23:34:34 2005 +0000 @@ -870,7 +870,7 @@ case MappingKeyboard: x_reset_key_mapping (d); break; case MappingModifier: x_reset_modifier_mapping (d); break; case MappingPointer: /* Do something here? */ break; - default: abort(); + default: ABORT(); } } @@ -2456,7 +2456,7 @@ return; } } - abort (); + ABORT (); } static void
--- a/src/event-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/event-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -904,7 +904,7 @@ return; } } - abort (); + ABORT (); } static void
--- a/src/event-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/event-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -1655,9 +1655,9 @@ mswindows_enqueue_process_event (XPROCESS (vaffanculo)); else { - /* abort (); */ + /* ABORT (); */ /* #### FUCKME! When can this happen? I hit this - abort() when I tried enabling it. */ + ABORT() when I tried enabling it. */ /* Have to return something: there may be no accompanying process event */ mswindows_enqueue_magic_event (NULL, XM_BUMPQUEUE); @@ -2823,7 +2823,7 @@ lcid = MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US); break; - default: abort (); lcid = 0; + default: ABORT (); lcid = 0; } /* VERY CONFUSING! See intl-win32.c. */ @@ -4419,7 +4419,7 @@ FROB (XM_MAPFRAME); FROB (XM_UNMAPFRAME); - default: abort (); + default: ABORT (); } #undef FROB
--- a/src/event-stream.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/event-stream.c Mon Jan 24 23:34:34 2005 +0000 @@ -1301,7 +1301,7 @@ Lisp_Object lid; id = event_stream_generate_wakeup (msecs, msecs2, function, object, 0); lid = make_int (id); - if (id != XINT (lid)) abort (); + if (id != XINT (lid)) ABORT (); return lid; } @@ -1380,7 +1380,7 @@ Lisp_Object lid; id = event_stream_generate_wakeup (msecs, msecs2, function, object, 1); lid = make_int (id); - if (id != XINT (lid)) abort (); + if (id != XINT (lid)) ABORT (); return lid; } @@ -3081,7 +3081,7 @@ event_stream_handle_magic_event (XEVENT (event)); goto done; default: - abort (); + ABORT (); } done: @@ -3591,7 +3591,7 @@ Lisp_Object e = XVECTOR_DATA (Vrecent_keys_ring)[j]; if (NILP (e)) - abort (); + ABORT (); XVECTOR_DATA (val)[i] = Fcopy_event (e, Qnil); if (++j >= recent_keys_ring_size) j = 0; @@ -3735,7 +3735,7 @@ { if (!n) { - /* must copy to avoid an abort() in next_event_internal() */ + /* must copy to avoid an ABORT() in next_event_internal() */ if (!NILP (XEVENT_NEXT (event))) return Fcopy_event (event, Qnil); else @@ -3868,7 +3868,7 @@ SET_EVENT_BUTTON_MODIFIERS (e, EVENT_BUTTON_MODIFIERS (e) | XEMACS_MOD_META); else - abort (); + ABORT (); { int tckn = event_chain_count (Vthis_command_keys);
--- a/src/events.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/events.c Mon Jan 24 23:34:34 2005 +0000 @@ -306,7 +306,7 @@ case dead_event: break; default: - abort (); + ABORT (); } mark_object (event->channel); return event->next; @@ -399,7 +399,7 @@ /* if (e1->timestamp != e2->timestamp) return 0; */ switch (e1->event_type) { - default: abort (); + default: ABORT (); case process_event: return EQ (EVENT_PROCESS_PROCESS (e1), EVENT_PROCESS_PROCESS (e2)); @@ -505,7 +505,7 @@ return hash; default: - abort (); + ABORT (); } return 0; /* unreached */ @@ -823,7 +823,7 @@ SET_EVENT_MISC_USER_Y (e, coord_y); break; default: - abort (); + ABORT (); } } @@ -884,18 +884,18 @@ if (EQ (event, Vlast_command_event) || EQ (event, Vlast_input_event) || EQ (event, Vunread_command_event)) - abort (); + ABORT (); len = XVECTOR_LENGTH (Vthis_command_keys); for (i = 0; i < len; i++) if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])) - abort (); + ABORT (); if (!NILP (Vrecent_keys_ring)) { int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring); for (i = 0; i < recent_ring_len; i++) if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])) - abort (); + ABORT (); } } #endif /* 0 */ @@ -1110,7 +1110,7 @@ event_chain = XEVENT_NEXT (event_chain); } - abort (); + ABORT (); return Qnil; } @@ -1324,7 +1324,7 @@ if (CHAR_OR_CHAR_INTP (XEVENT_KEY_KEYSYM (event))) c = XCHAR_OR_CHAR_INT (XEVENT_KEY_KEYSYM (event)); else if (!SYMBOLP (XEVENT_KEY_KEYSYM (event))) - abort (); + ABORT (); else if (map_device_key_names && !NILP (Vcharacter_set_property) /* Allow window-system-specific extensibility of keysym->code mapping */ @@ -1551,7 +1551,7 @@ case empty_event: eicat_ascii (buf, "empty"); return; case dead_event: eicat_ascii (buf, "DEAD-EVENT"); return; default: - abort (); + ABORT (); return; } #define modprint(x,y) \ @@ -1591,7 +1591,7 @@ eicat_lstr (buf, XSYMBOL (key)->name); } else - abort (); + ABORT (); if (mouse_p) eicat_ascii (buf, "up"); } @@ -1740,7 +1740,7 @@ return Qempty; default: - abort (); + ABORT (); return Qnil; } } @@ -2130,9 +2130,9 @@ || TOOLBAR_BUTTONP (ret_obj1) #endif )) - abort (); + ABORT (); if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2))) - abort (); + ABORT (); if (char_x) *char_x = ret_x; @@ -2480,7 +2480,7 @@ switch (EVENT_TYPE (e)) { - default: abort (); + default: ABORT (); case process_event: props = cons3 (Qprocess, EVENT_PROCESS_PROCESS (e), props);
--- a/src/extents.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/extents.c Mon Jan 24 23:34:34 2005 +0000 @@ -2020,7 +2020,7 @@ case ME_ALL_EXTENTS_OPEN: start_open = 1, end_open = 1; break; case ME_ALL_EXTENTS_CLOSED_OPEN: start_open = 0, end_open = 1; break; case ME_ALL_EXTENTS_OPEN_CLOSED: start_open = 1, end_open = 0; break; - default: abort(); return 0; + default: ABORT(); return 0; } start = buffer_or_string_bytexpos_to_startind (obj, from, @@ -2056,7 +2056,7 @@ retval = (start <= exs && exs <= end) || (start <= exe && exe <= end); break; default: - abort(); return 0; + ABORT(); return 0; } return flags & ME_NEGATE_IN_REGION ? !retval : retval; } @@ -3161,7 +3161,7 @@ Lisp_Object obj2 = Qnil; /* Destroyed extents have 't' in the object field, causing - extent_object() to abort (maybe). */ + extent_object() to ABORT (maybe). */ if (EXTENT_LIVE_P (XEXTENT (obj))) obj2 = extent_object (XEXTENT (obj)); @@ -4781,10 +4781,10 @@ #ifdef ERROR_CHECK_EXTENTS if (extent_start (extent) > indice && extent_start (extent) < indice + closure->length) - abort (); + ABORT (); if (extent_end (extent) > indice && extent_end (extent) < indice + closure->length) - abort (); + ABORT (); #endif /* The extent-adjustment code adjusted the extent's endpoints as if @@ -5282,7 +5282,7 @@ case GL_INSIDE_MARGIN: return Qinside_margin; case GL_WHITESPACE: return Qwhitespace; default: - abort (); + ABORT (); return Qnil; /* unreached */ } }
--- a/src/faces.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/faces.c Mon Jan 24 23:34:34 2005 +0000 @@ -318,7 +318,7 @@ if (EQ (keyw, Qname)) name_seen = 1; else - abort (); + ABORT (); } if (!name_seen)
--- a/src/file-coding.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/file-coding.c Mon Jan 24 23:34:34 2005 +0000 @@ -730,7 +730,7 @@ { switch (type) { - default: abort (); + default: ABORT (); case EOL_LF: return Qlf; case EOL_CRLF: return Qcrlf; case EOL_CR: return Qcr; @@ -1579,7 +1579,7 @@ case EOL_LF: new_coding_system = CODING_SYSTEM_EOL_LF (cs); break; case EOL_CR: new_coding_system = CODING_SYSTEM_EOL_CR (cs); break; case EOL_CRLF: new_coding_system = CODING_SYSTEM_EOL_CRLF (cs); break; - default: abort (); return Qnil; + default: ABORT (); return Qnil; } return NILP (new_coding_system) ? coding_system : new_coding_system; @@ -2679,7 +2679,7 @@ case 3: return DECODES_CHARACTER_TO_CHARACTER; } - abort (); + ABORT (); return DECODES_BYTE_TO_BYTE; } @@ -2836,7 +2836,7 @@ data->subtype == EOL_CRLF ? "crlf" : data->subtype == EOL_CR ? "cr" : data->subtype == EOL_AUTODETECT ? "nil" : - (abort(), "")); + (ABORT(), "")); } static enum source_sink_type @@ -2884,7 +2884,7 @@ case EOL_CRLF: return Qcrlf; case EOL_CR: return Qcr; case EOL_AUTODETECT: return Qnil; - default: abort (); + default: ABORT (); } } @@ -3036,7 +3036,7 @@ case EOL_CRLF: return Fget_coding_system (Qconvert_eol_crlf); case EOL_CR: return Fget_coding_system (Qconvert_eol_cr); case EOL_AUTODETECT: return str->codesys; - default: abort (); return Qnil; + default: ABORT (); return Qnil; } } @@ -3256,7 +3256,7 @@ return Dynarr_at (cats, j).sym; } - abort (); + ABORT (); return Qnil; /* (usually) not reached */ } @@ -3277,7 +3277,7 @@ #undef FROB } - abort (); + ABORT (); return Qnil; /* (usually) not reached */ }
--- a/src/fileio.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/fileio.c Mon Jan 24 23:34:34 2005 +0000 @@ -3913,7 +3913,7 @@ and if so, tries to avoid touching lisp objects. The only time that Fdo_auto_save() is called while GC is in progress - is if we're going down, as a result of an abort() or a kill signal. + is if we're going down, as a result of an ABORT() or a kill signal. It's fairly important that we generate autosave files in that case! */
--- a/src/fns.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/fns.c Mon Jan 24 23:34:34 2005 +0000 @@ -741,7 +741,7 @@ break; default: val = Qnil; - abort (); + ABORT (); } } @@ -1031,7 +1031,7 @@ } else { - abort (); /* unreachable, since Flength (sequence) did not get + ABORT (); /* unreachable, since Flength (sequence) did not get an error */ return Qnil; } @@ -3254,7 +3254,7 @@ } } else - abort (); /* unreachable, since Flength (sequence) did not get an error */ + ABORT (); /* unreachable, since Flength (sequence) did not get an error */ if (vals) UNGCPRO; @@ -3873,7 +3873,7 @@ encoded_length = base64_encode_1 (XLSTREAM (input), encoded, NILP (no_line_break)); if (encoded_length > allength) - abort (); + ABORT (); Lstream_delete (XLSTREAM (input)); /* Now we have encoded the region, so we insert the new contents @@ -3915,7 +3915,7 @@ encoded_length = base64_encode_1 (XLSTREAM (input), encoded, NILP (no_line_break)); if (encoded_length > allength) - abort (); + ABORT (); Lstream_delete (XLSTREAM (input)); result = make_string (encoded, encoded_length); unbind_to (speccount); @@ -3948,7 +3948,7 @@ decoded = (Ibyte *) MALLOC_OR_ALLOCA (length * MAX_ICHAR_LEN); decoded_length = base64_decode_1 (XLSTREAM (input), decoded, &cc_decoded_length); if (decoded_length > length * MAX_ICHAR_LEN) - abort (); + ABORT (); Lstream_delete (XLSTREAM (input)); /* Now we have decoded the region, so we insert the new contents @@ -3989,7 +3989,7 @@ decoded_length = base64_decode_1 (XLSTREAM (input), decoded, &cc_decoded_length); if (decoded_length > length * MAX_ICHAR_LEN) - abort (); + ABORT (); Lstream_delete (XLSTREAM (input)); result = make_string (decoded, decoded_length);
--- a/src/font-lock.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/font-lock.c Mon Jan 24 23:34:34 2005 +0000 @@ -529,7 +529,7 @@ context_cache.context = context_comment; context_cache.ccontext = ccontext_none; context_cache.style = SINGLE_SYNTAX_STYLE (syncode); - if (context_cache.style == comment_style_none) abort (); + if (context_cache.style == comment_style_none) ABORT (); } break; @@ -621,7 +621,7 @@ { context_cache.ccontext = ccontext_start2; context_cache.style = SYNTAX_START_STYLE (prev_syncode, syncode); - if (context_cache.style == comment_style_none) abort (); + if (context_cache.style == comment_style_none) ABORT (); } else if ((SYNTAX_CODE_COMMENT_BITS (syncode) & SYNTAX_FIRST_CHAR_START) && @@ -659,18 +659,18 @@ of a comment-end sequence. ie, '/xxx foo xxx/' or '/xxx foo x/', where 'x' = '*' -- mct */ { - if (context_cache.style == comment_style_none) abort (); + if (context_cache.style == comment_style_none) ABORT (); context_cache.ccontext = ccontext_end1; } else if (context_cache.ccontext == ccontext_start1) { - if (context_cache.context != context_none) abort (); + if (context_cache.context != context_none) ABORT (); context_cache.ccontext = ccontext_none; } else if (context_cache.ccontext == ccontext_end1) { - if (context_cache.context != context_block_comment) abort (); + if (context_cache.context != context_block_comment) ABORT (); context_cache.context = context_none; context_cache.ccontext = ccontext_start2; } @@ -679,7 +679,7 @@ context_cache.context == context_none) { context_cache.context = context_block_comment; - if (context_cache.style == comment_style_none) abort (); + if (context_cache.style == comment_style_none) ABORT (); } else if (context_cache.ccontext == ccontext_none && context_cache.context == context_block_comment) @@ -703,7 +703,7 @@ case context_block_comment: return Qblock_comment; case context_generic_comment: return Qblock_comment; case context_generic_string: return Qstring; - default: abort (); return Qnil; /* suppress compiler warning */ + default: ABORT (); return Qnil; /* suppress compiler warning */ } }
--- a/src/frame-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/frame-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -1111,7 +1111,7 @@ } else { - /* abort()? */ + /* ABORT()? */ stderr_out ("POINTER_IMAGE_INSTANCEP (f->pointer) failed!\n"); } } @@ -1423,7 +1423,7 @@ } } else - abort (); + ABORT (); #ifdef HAVE_TOOLBARS /* Setting the background clears the entire frame area
--- a/src/frame-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/frame-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -221,14 +221,14 @@ void x_wm_mark_shell_size_user_specified (Widget wmshell) { - if (! XtIsWMShell (wmshell)) abort (); + if (! XtIsWMShell (wmshell)) ABORT (); EmacsShellSetSizeUserSpecified (wmshell); } void x_wm_mark_shell_position_user_specified (Widget wmshell) { - if (! XtIsWMShell (wmshell)) abort (); + if (! XtIsWMShell (wmshell)) ABORT (); EmacsShellSetPositionUserSpecified (wmshell); } @@ -237,7 +237,7 @@ void x_wm_set_shell_iconic_p (Widget shell, int iconic_p) { - if (! XtIsWMShell (shell)) abort (); + if (! XtIsWMShell (shell)) ABORT (); /* Because of questionable logic in Shell.c, this sequence can't work: @@ -267,9 +267,9 @@ Arg al [2]; if (!XtIsWMShell (wmshell)) - abort (); + ABORT (); if (cw <= 0 || ch <= 0) - abort (); + ABORT (); XtSetArg (al[0], XtNwidthInc, cw); XtSetArg (al[1], XtNheightInc, ch); @@ -282,7 +282,7 @@ Arg al [2]; if (!XtIsWMShell (wmshell)) - abort (); + ABORT (); #ifdef DEBUG_GEOMETRY_MANAGEMENT /* See comment in EmacsShell.c */ printf ("x_wm_set_variable_size: %d %d\n", width, height); @@ -351,7 +351,7 @@ XClassHint classhint; if (!XtIsWMShell (shell)) - abort (); + ABORT (); XtGetApplicationNameAndClass (dpy, &app_name, &app_class); classhint.res_name = frame_name; @@ -368,7 +368,7 @@ struct device *d = XDEVICE (FRAME_DEVICE (f)); if (!XtIsWMShell (w)) - abort (); + ABORT (); if (NILP (DEVICE_X_WM_COMMAND_FRAME (d))) { @@ -1557,7 +1557,7 @@ /* OK, we're a top-level shell. */ if (!XtIsWMShell (wmshell)) - abort (); + ABORT (); /* If the EmacsFrame doesn't have a geometry but the shell does, treat that as the geometry of the frame. @@ -2684,7 +2684,7 @@ } } else - abort (); + ABORT (); XtSetValues (FRAME_X_TEXT_WIDGET (frm), al, ac);
--- a/src/frame.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/frame.c Mon Jan 24 23:34:34 2005 +0000 @@ -881,7 +881,7 @@ /* use this instead of XFRAME (DEVICE_SELECTED_FRAME (d)) to catch the possibility of there being no frames on the device (just created). There is no point doing this inside of redisplay because errors - cause an abort(), indicating a flaw in the logic, and error_check_frame() + cause an ABORT(), indicating a flaw in the logic, and error_check_frame() will catch this just as well. */ struct frame * @@ -1743,7 +1743,7 @@ that is prohibited at the top; you can't delete surrogate minibuffer frames. */ if (NILP (frame_with_minibuf)) - abort (); + ABORT (); con->default_minibuffer_frame = frame_with_minibuf; } @@ -1825,7 +1825,7 @@ break; default: - abort (); /* method is incorrectly written */ + ABORT (); /* method is incorrectly written */ } return 0; @@ -3213,7 +3213,7 @@ `left' coordinates to be recomputed even though no frame size change occurs. --kyle */ if (in_display || hold_frame_size_changes) - abort (); + ABORT (); frame = wrap_frame (f);
--- a/src/free-hook.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/free-hook.c Mon Jan 24 23:34:34 2005 +0000 @@ -141,7 +141,7 @@ /* I originally wrote: "There's really no need to drop core." I have seen the error of my ways. -slb */ if (strict_free_check) - abort (); + ABORT (); #endif printf("Freeing unmalloc'ed memory at %p\n", ptr); __free_hook = check_free; @@ -155,7 +155,7 @@ #if !defined(__linux__) /* See above comment. */ if (strict_free_check) - abort (); + ABORT (); #endif printf("Freeing %p twice\n", ptr); __free_hook = check_free; @@ -264,7 +264,7 @@ come from malloc. */ #if !defined(__linux__) /* see comment in check_free(). */ - abort (); + ABORT (); #endif printf("Realloc'ing unmalloc'ed pointer at %p\n", ptr); } @@ -445,7 +445,7 @@ note_block_input (char *file, int line) { note_block (file, line, block_type); - if (interrupt_input_blocked > 2) abort(); + if (interrupt_input_blocked > 2) ABORT(); } note_unblock_input (char* file, int line) @@ -485,15 +485,15 @@ if (type == ungcpro_type) { if (value == gcprolist) goto OK; - if (! gcprolist) abort (); + if (! gcprolist) ABORT (); if (value == gcprolist->next) goto OK; - if (! gcprolist->next) abort (); + if (! gcprolist->next) ABORT (); if (value == gcprolist->next->next) goto OK; - if (! gcprolist->next->next) abort (); + if (! gcprolist->next->next) ABORT (); if (value == gcprolist->next->next->next) goto OK; - if (! gcprolist->next->next->next) abort (); + if (! gcprolist->next->next->next) ABORT (); if (value == gcprolist->next->next->next->next) goto OK; - abort (); + ABORT (); OK:; } gcprohist[gcprohistptr].file = file;
--- a/src/gccache-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/gccache-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -160,8 +160,8 @@ struct gc_cache_cell *cell, *next, *prev; struct gcv_and_mask gcvm; - if ((!!cache->head) != (!!cache->tail)) abort (); - if (cache->head && (cache->head->prev || cache->tail->next)) abort (); + if ((!!cache->head) != (!!cache->tail)) ABORT (); + if (cache->head && (cache->head->prev || cache->tail->next)) ABORT (); /* Gdk does not have the equivalent of 'None' for the clip_mask, so we need to check it carefully, or gdk_gc_new_with_values will @@ -216,10 +216,10 @@ cell->prev = cache->tail; cache->tail->next = cell; cache->tail = cell; - if (cache->head == cell) abort (); - if (cell->next) abort (); - if (cache->head->prev) abort (); - if (cache->tail->next) abort (); + if (cache->head == cell) ABORT (); + if (cell->next) ABORT (); + if (cache->head->prev) ABORT (); + if (cache->tail->next) ABORT (); return cell->gc; } @@ -241,7 +241,7 @@ #endif } else if (cache->size > GC_CACHE_SIZE) - abort (); + ABORT (); else { /* Allocate a new cell (don't put it in the list or table yet). */
--- a/src/glyphs-eimage.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/glyphs-eimage.c Mon Jan 24 23:34:34 2005 +0000 @@ -104,6 +104,17 @@ BEGIN_C_DECLS +#ifdef WIN32_NATIVE +/* #### Yuck! More horrifitude. tiffio.h, below, includes <windows.h>, which + defines INT32 and INT16, the former differently and incompatibly from jmorecfg.h, + included by jpeglib.h. We can disable the stuff in jmorecfg.h by defining XMD_H + (clever, huh?); then we define these typedefs the way that <windows.h> wants them + (which is more correct, anyway; jmorecfg.h defines INT32 as `long'). */ +#define XMD_H +typedef signed int INT32; +typedef signed short INT16; +#endif + #include <jpeglib.h> #include <jerror.h> @@ -1115,7 +1126,7 @@ tiff_memory_write (thandle_t UNUSED (data), tdata_t UNUSED (buf), tsize_t UNUSED (size)) { - abort(); + ABORT(); return 0; }
--- a/src/glyphs-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/glyphs-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -401,7 +401,7 @@ #endif else if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { - abort(); + ABORT(); } else { @@ -763,7 +763,7 @@ gint width, height, depth; if (!DEVICE_GTK_P (device)) - abort (); + ABORT (); IMAGE_INSTANCE_DEVICE (ii) = device; IMAGE_INSTANCE_TYPE (ii) = IMAGE_COLOR_PIXMAP; @@ -1010,7 +1010,7 @@ break; default: - abort (); + ABORT (); } } @@ -1304,7 +1304,7 @@ break; default: - abort (); + ABORT (); } UNGCPRO; @@ -1929,7 +1929,7 @@ if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { /* We don't support subwindows, but we do support widgets... */ - abort (); + ABORT (); } else /* must be a widget */ { @@ -1952,7 +1952,7 @@ if (IMAGE_INSTANCE_TYPE (p) == IMAGE_SUBWINDOW) { /* No subwindow support... */ - abort (); + ABORT (); } else /* must be a widget */ { @@ -2391,7 +2391,7 @@ else { /* Unknown button type... */ - abort(); + ABORT(); } }
--- a/src/glyphs-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/glyphs-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -1551,7 +1551,7 @@ break; default: - abort (); + ABORT (); } } @@ -1622,6 +1622,9 @@ instead of strings.h. */ #define SYSV32 BEGIN_C_DECLS +#ifndef __STDC__ /* Needed to avoid prototype warnings */ +#define __STDC__ +#endif #include <compface.h> END_C_DECLS
--- a/src/glyphs-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/glyphs-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -1037,7 +1037,7 @@ break; default: - abort (); + ABORT (); } } @@ -1164,7 +1164,7 @@ /* Duplicate the pixel value so that we still have a lock on it if the pixel we were passed is later freed. */ if (! XAllocColor (dpy, cmap, &color)) - abort (); /* it must be allocable since we're just duplicating it */ + ABORT (); /* it must be allocable since we're just duplicating it */ TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (cons), C_STRING_MALLOC, symbols[i].name, Qctext); @@ -1524,7 +1524,7 @@ break; default: - abort (); + ABORT (); } xpm_free (&xpmattrs); /* after we've read pixels and hotspot */
--- a/src/glyphs.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/glyphs.c Mon Jan 24 23:34:34 2005 +0000 @@ -711,7 +711,7 @@ else if (governing_domain == GOVERNING_DOMAIN_DEVICE) domain = DOMAIN_DEVICE (domain); else - abort (); + ABORT (); return domain; } @@ -1087,7 +1087,7 @@ break; default: - abort (); + ABORT (); } MAYBE_DEVMETH (DOMAIN_XDEVICE (ii->domain), print_image_instance, @@ -1209,7 +1209,7 @@ break; default: - abort (); + ABORT (); } return DEVMETH_OR_GIVEN (DOMAIN_XDEVICE (i1->domain), @@ -1288,7 +1288,7 @@ break; default: - abort (); + ABORT (); } return HASH2 (hash, DEVMETH_OR_GIVEN @@ -1373,7 +1373,7 @@ case IMAGE_SUBWINDOW: return Qsubwindow; case IMAGE_WIDGET: return Qwidget; default: - abort (); + ABORT (); } return Qnil; /* not reached */ @@ -2299,7 +2299,7 @@ int UNUSED (dest_mask), Lisp_Object UNUSED (domain)) { /* handled specially in image_instantiate */ - abort (); + ABORT (); } @@ -3337,7 +3337,7 @@ Qunbound); } else - abort (); /* We're not allowed anything else currently. */ + ABORT (); /* We're not allowed anything else currently. */ /* If we don't have an instance at this point then create one. */ @@ -3414,7 +3414,7 @@ RETURN_UNGCPRO (instance); } - abort (); + ABORT (); return Qnil; /* not reached */ } @@ -3810,7 +3810,7 @@ | IMAGE_COLOR_PIXMAP_MASK; break; default: - abort (); + ABORT (); } /* I think Fmake_specifier can GC. I think set_specifier_fallback can GC. */ @@ -3935,7 +3935,7 @@ CHECK_GLYPH (glyph); switch (XGLYPH_TYPE (glyph)) { - default: abort (); + default: ABORT (); case GLYPH_BUFFER: return Qbuffer; case GLYPH_POINTER: return Qpointer; case GLYPH_ICON: return Qicon; @@ -5018,7 +5018,7 @@ continue; } else - abort (); + ABORT (); } }
--- a/src/gtk-glue.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/gtk-glue.c Mon Jan 24 23:34:34 2005 +0000 @@ -93,7 +93,7 @@ } else { - abort(); + ABORT(); } } @@ -130,7 +130,7 @@ } else { - abort(); + ABORT(); } } return (rval); @@ -181,7 +181,7 @@ } else { - abort(); + ABORT(); } #undef FROB }
--- a/src/gutter.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/gutter.c Mon Jan 24 23:34:34 2005 +0000 @@ -70,7 +70,7 @@ (frame)->right_gutter_was_visible = flag; \ break; \ default: \ - abort (); \ + ABORT (); \ } \ } while (0) @@ -87,7 +87,7 @@ case RIGHT_GUTTER: return frame->right_gutter_was_visible; default: - abort (); + ABORT (); return 0; /* To keep the compiler happy */ } } @@ -214,7 +214,7 @@ break; default: - abort (); + ABORT (); } }
--- a/src/input-method-xlib.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/input-method-xlib.c Mon Jan 24 23:34:34 2005 +0000 @@ -514,7 +514,7 @@ case XLookupChars: break; default: - abort (); + ABORT (); } new_event.type = ClientMessage;
--- a/src/insdel.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/insdel.c Mon Jan 24 23:34:34 2005 +0000 @@ -421,7 +421,7 @@ move_gap (struct buffer *buf, Charbpos cpos, Bytebpos bpos) { if (! BUF_BEG_ADDR (buf)) - abort (); + ABORT (); if (bpos < BYTE_BUF_GPT (buf)) gap_left (buf, cpos, bpos); else if (bpos > BYTE_BUF_GPT (buf))
--- a/src/intl-auto-encap-win32.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/intl-auto-encap-win32.c Mon Jan 24 23:34:34 2005 +0000 @@ -2629,19 +2629,6 @@ #if defined (HAVE_MS_WINDOWS) -BOOL -qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6) -{ - if (XEUNICODE_P) - return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); - else - return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); -} - -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) - DWORD qxeImmGetCandidateListCount (HIMC arg1, LPDWORD lpdwListCount) { @@ -3145,33 +3132,6 @@ return FindResourceExA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, wLanguage); } -BOOL -qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROC lpEnumFunc, LONG lParam) -{ - if (XEUNICODE_P) - return EnumResourceTypesW (hModule, lpEnumFunc, lParam); - else - return EnumResourceTypesA (hModule, lpEnumFunc, lParam); -} - -BOOL -qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam) -{ - if (XEUNICODE_P) - return EnumResourceNamesW (hModule, (LPCWSTR) lpType, lpEnumFunc, lParam); - else - return EnumResourceNamesA (hModule, (LPCSTR) lpType, lpEnumFunc, lParam); -} - -BOOL -qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROC lpEnumFunc, LONG lParam) -{ - if (XEUNICODE_P) - return EnumResourceLanguagesW (hModule, (LPCWSTR) lpType, (LPCWSTR) lpName, lpEnumFunc, lParam); - else - return EnumResourceLanguagesA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, lpEnumFunc, lParam); -} - HANDLE qxeBeginUpdateResource (const Extbyte * pFileName, BOOL bDeleteExistingResources) {
--- a/src/intl-auto-encap-win32.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/intl-auto-encap-win32.h Mon Jan 24 23:34:34 2005 +0000 @@ -1884,14 +1884,6 @@ #if defined (HAVE_MS_WINDOWS) #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED -#undef ImmSetCompositionString -#define ImmSetCompositionString error_use_qxeImmSetCompositionString_or_ImmSetCompositionStringA_and_ImmSetCompositionStringW -#endif -BOOL qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6); -#endif /* defined (HAVE_MS_WINDOWS) */ - -#if defined (HAVE_MS_WINDOWS) -#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED #undef ImmGetCandidateListCount #define ImmGetCandidateListCount error_use_qxeImmGetCandidateListCount_or_ImmGetCandidateListCountA_and_ImmGetCandidateListCountW #endif @@ -2229,24 +2221,6 @@ HRSRC qxeFindResourceEx (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, WORD wLanguage); #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED -#undef EnumResourceTypes -#define EnumResourceTypes error_use_qxeEnumResourceTypes_or_EnumResourceTypesA_and_EnumResourceTypesW -#endif -BOOL qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROC lpEnumFunc, LONG lParam); - -#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED -#undef EnumResourceNames -#define EnumResourceNames error_use_qxeEnumResourceNames_or_EnumResourceNamesA_and_EnumResourceNamesW -#endif -BOOL qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam); - -#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED -#undef EnumResourceLanguages -#define EnumResourceLanguages error_use_qxeEnumResourceLanguages_or_EnumResourceLanguagesA_and_EnumResourceLanguagesW -#endif -BOOL qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROC lpEnumFunc, LONG lParam); - -#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED #undef BeginUpdateResource #define BeginUpdateResource error_use_qxeBeginUpdateResource_or_BeginUpdateResourceA_and_BeginUpdateResourceW #endif
--- a/src/intl-encap-win32.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/intl-encap-win32.c Mon Jan 24 23:34:34 2005 +0000 @@ -146,9 +146,9 @@ yes OutputDebugString yes FindResource yes FindResourceEx -yes EnumResourceTypes -yes EnumResourceNames -yes EnumResourceLanguages +skip EnumResourceTypes different prototypes in VC6 and VC7 +skip EnumResourceNames different prototypes in VC6 and VC7 +skip EnumResourceLanguages different prototypes in VC6 and VC7 yes BeginUpdateResource yes UpdateResource yes EndUpdateResource @@ -797,7 +797,7 @@ yes ImmGetDescription yes ImmGetIMEFileName yes ImmGetCompositionString -yes ImmSetCompositionString +skip ImmSetCompositionString different prototypes in VC6 and VC7 yes ImmGetCandidateListCount yes ImmGetCandidateList yes ImmGetGuideLine @@ -1249,6 +1249,69 @@ #endif /* not CYGWIN */ +/********************************************************************************/ +/* would be encapsulatable but for header changes in different versions of VC++ */ +/********************************************************************************/ + +#if MSC_VERSION >= 1300 + +BOOL +qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG lParam) +{ + if (XEUNICODE_P) + return EnumResourceTypesW (hModule, lpEnumFunc, lParam); + else + return EnumResourceTypesA (hModule, (ENUMRESTYPEPROCA) lpEnumFunc, lParam); +} + +BOOL +qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG lParam) +{ + if (XEUNICODE_P) + return EnumResourceNamesW (hModule, (LPCWSTR) lpType, lpEnumFunc, lParam); + else + return EnumResourceNamesA (hModule, (LPCSTR) lpType, (ENUMRESNAMEPROCA) lpEnumFunc, lParam); +} + +BOOL +qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROCW lpEnumFunc, LONG lParam) +{ + if (XEUNICODE_P) + return EnumResourceLanguagesW (hModule, (LPCWSTR) lpType, (LPCWSTR) lpName, lpEnumFunc, lParam); + else + return EnumResourceLanguagesA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, (ENUMRESLANGPROCA) lpEnumFunc, lParam); +} + +#else + +BOOL +qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROC lpEnumFunc, LONG lParam) +{ + if (XEUNICODE_P) + return EnumResourceTypesW (hModule, lpEnumFunc, lParam); + else + return EnumResourceTypesA (hModule, lpEnumFunc, lParam); +} + +BOOL +qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam) +{ + if (XEUNICODE_P) + return EnumResourceNamesW (hModule, (LPCWSTR) lpType, lpEnumFunc, lParam); + else + return EnumResourceNamesA (hModule, (LPCSTR) lpType, lpEnumFunc, lParam); +} + +BOOL +qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROC lpEnumFunc, LONG lParam) +{ + if (XEUNICODE_P) + return EnumResourceLanguagesW (hModule, (LPCWSTR) lpType, (LPCWSTR) lpName, lpEnumFunc, lParam); + else + return EnumResourceLanguagesA (hModule, (LPCSTR) lpType, (LPCSTR) lpName, lpEnumFunc, lParam); +} + +#endif /* MSC_VERSION >= 1300 */ /************************************************************************/ /* files */ @@ -2047,7 +2110,31 @@ return retval; } } - + +#if MSC_VERSION >= 1300 + +BOOL +qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPVOID lpComp, DWORD arg4, LPVOID lpRead, DWORD arg6) +{ + if (XEUNICODE_P) + return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); + else + return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); +} + +#else + +BOOL +qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6) +{ + if (XEUNICODE_P) + return ImmSetCompositionStringW (arg1, dwIndex, lpComp, arg4, lpRead, arg6); + else + return ImmSetCompositionStringA (arg1, dwIndex, lpComp, arg4, lpRead, arg6); +} + +#endif /* MSC_VERSION >= 1300 */ + int qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject) {
--- a/src/intl-win32.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/intl-win32.c Mon Jan 24 23:34:34 2005 +0000 @@ -1716,7 +1716,7 @@ case MULTIBYTE_SYSTEM_DEFAULT: locale = GetSystemDefaultLCID (); break; default: - abort (); locale = 0; + ABORT (); locale = 0; } switch (data->cp_type) @@ -1752,7 +1752,7 @@ return 0; #endif default: - abort (); return 0; + ABORT (); return 0; } #else /* not MULE */ return CP_ACP; @@ -1825,7 +1825,7 @@ case MULTIBYTE_OEM: return Qoem; case MULTIBYTE_EBCDIC: return Qebcdic; case MULTIBYTE_MAC: return Qmac; - default: abort (); + default: ABORT (); } } else if (EQ (prop, Qlocale)) @@ -1840,7 +1840,7 @@ case MULTIBYTE_SPECIFIED_CODE_PAGE: return Qnil; - default: abort (); + default: ABORT (); } } @@ -2146,7 +2146,7 @@ Bytecount orign = n; /* should never be called; is preprocessed away in the canonicalize method */ - abort (); + ABORT (); return orign; }
--- a/src/keymap.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/keymap.c Mon Jan 24 23:34:34 2005 +0000 @@ -472,7 +472,7 @@ if ((modifiers & ~(XEMACS_MOD_CONTROL | XEMACS_MOD_META | XEMACS_MOD_SUPER | XEMACS_MOD_HYPER | XEMACS_MOD_ALT | XEMACS_MOD_SHIFT)) != 0) - abort (); + ABORT (); k = XKEYMAP (keymap); @@ -547,7 +547,7 @@ Lisp_Object *prev; if (UNBOUNDP (keys)) - abort (); + ABORT (); for (prev = &new_keys, tail = new_keys; ; @@ -1757,7 +1757,7 @@ else { new_keys = Qnil; - abort (); + ABORT (); } if (EQ (keys, new_keys)) @@ -3134,10 +3134,10 @@ key.modifiers = modifiers; if (NILP (cmd)) - abort (); + ABORT (); cmd = get_keymap (cmd, 0, 1); if (!KEYMAPP (cmd)) - abort (); + ABORT (); vec = make_vector (XVECTOR_LENGTH (thisseq) + 1, Qnil); len = XVECTOR_LENGTH (thisseq); @@ -3661,7 +3661,7 @@ /* OK, the key is for real */ if (target_buffer) { - if (!firstonly) abort (); + if (!firstonly) ABORT (); format_raw_keys (so_far, keys_count + 1, target_buffer); return make_int (1); }
--- a/src/lisp.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/lisp.h Mon Jan 24 23:34:34 2005 +0000 @@ -1044,7 +1044,7 @@ /* Highly dubious kludge */ /* (thanks, Jamie, I feel better now -- ben) */ MODULE_API void assert_failed (const Ascbyte *, int, const Ascbyte *); -# define abort() (assert_failed (__FILE__, __LINE__, "abort()")) +# define ABORT() (assert_failed (__FILE__, __LINE__, "ABORT()")) # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) # define assert_with_message(x, msg) \ ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg)) @@ -1052,8 +1052,8 @@ ((x) ? (void) 0 : assert_failed (file, line, #x)) #else # ifdef DEBUG_XEMACS -# define assert(x) ((x) ? (void) 0 : (void) abort ()) -# define assert_with_message(x, msg) ((x) ? (void) 0 : (void) abort ()) +# define assert(x) ((x) ? (void) 0 : (void) ABORT ()) +# define assert_with_message(x, msg) ((x) ? (void) 0 : (void) ABORT ()) # define assert_at_line(x, file, line) assert (x) # else # define assert(x) ((void) 0) @@ -1983,7 +1983,7 @@ /* For a list that's known to be in valid list format, where we may be deleting the current element out of the list -- - will abort() if the list is not in valid format */ + will ABORT() if the list is not in valid format */ #define LIST_LOOP_DELETING(consvar, nextconsvar, list) \ for (consvar = list; \ !NILP (consvar) ? (nextconsvar = XCDR (consvar), 1) :0; \ @@ -2542,7 +2542,7 @@ #define CONCHECK_MARKER(x) CONCHECK_RECORD (x, marker) /* The second check was looking for GCed markers still in use */ -/* if (INTP (XMARKER (x)->lheader.next.v)) abort (); */ +/* if (INTP (XMARKER (x)->lheader.next.v)) ABORT (); */ #define marker_next(m) ((m)->next) #define marker_prev(m) ((m)->prev)
--- a/src/lread.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/lread.c Mon Jan 24 23:34:34 2005 +0000 @@ -1839,7 +1839,7 @@ else if (sizeof (long) == sizeof (EMACS_INT)) number = atol (read_buffer); else - abort (); + ABORT (); return make_int (number); } #else
--- a/src/lstream.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/lstream.c Mon Jan 24 23:34:34 2005 +0000 @@ -300,7 +300,7 @@ } } - abort (); + ABORT (); } #define Lstream_internal_error(reason, lstr) \ @@ -371,7 +371,7 @@ EWOULDBLOCK error. */ break; else if (num_written > size) - abort (); + ABORT (); else if (num_written > 0) { data += num_written; @@ -1646,7 +1646,7 @@ /* Make sure the luser didn't pass "w" in. */ if (!strcmp (mode, "w")) - abort (); + ABORT (); if (flags & LSTR_IGNORE_ACCESSIBLE) {
--- a/src/macros.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/macros.c Mon Jan 24 23:34:34 2005 +0000 @@ -181,7 +181,7 @@ void pop_kbd_macro_event (Lisp_Object event) { - if (NILP (Vexecuting_macro)) abort (); + if (NILP (Vexecuting_macro)) ABORT (); if (STRINGP (Vexecuting_macro) || VECTORP (Vexecuting_macro)) {
--- a/src/malloc.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/malloc.c Mon Jan 24 23:34:34 2005 +0000 @@ -525,7 +525,7 @@ #ifdef rcheck botch ("block on free list clobbered"); #else /* not rcheck */ - abort (); + ABORT (); #endif /* not rcheck */ /* Fill in the info, and if range checking, set up the magic numbers */ @@ -569,7 +569,7 @@ #ifndef rcheck if (p -> mh_alloc != ISALLOC) - abort (); + ABORT (); #else /* rcheck */ if (p -> mh_alloc != ISALLOC)
--- a/src/menubar-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/menubar-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -1036,7 +1036,7 @@ else { return (NULL); - /* abort (); ???? */ + /* ABORT (); ???? */ } } @@ -1154,7 +1154,7 @@ else { widget = gtk_menu_item_new_with_label ("ERROR"); - /* abort() */ + /* ABORT() */ } gtk_widget_show_all (widget); }
--- a/src/menubar-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/menubar-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -557,12 +557,12 @@ if (menubar == NULL) return; - /* #### If a filter function has set desc to Qnil, this abort() + /* #### If a filter function has set desc to Qnil, this ABORT() triggers. To resolve, we must prevent filters explicitly from mangling with the active menu. In apply_filter probably? Is copy-tree on the whole menu too expensive? */ if (NILP (desc)) - /* abort(); */ + /* ABORT(); */ return; GCPRO1 (desc); /* just to be safe -- see above */
--- a/src/menubar-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/menubar-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -576,7 +576,7 @@ data = compute_menubar_data (f, menubar, deep_p); if (!data || (!data->next && !data->contents)) - abort (); + ABORT (); if (!FRAME_X_MENUBAR_ID (f)) FRAME_X_MENUBAR_ID (f) = new_lwlib_id ();
--- a/src/mule-coding.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/mule-coding.c Mon Jan 24 23:34:34 2005 +0000 @@ -1247,7 +1247,7 @@ chars = 96; dim = 2; break; default: - abort (); chars = 0; dim = 0; + ABORT (); chars = 0; dim = 0; } charset = Fmake_charset (Qunbound, Qnil, @@ -1552,7 +1552,7 @@ else { /* Can this ever be reached? -slb */ - abort (); + ABORT (); goto error; } @@ -1601,7 +1601,7 @@ designated: if (NILP (cs) && check_invalid_charsets) { - abort (); + ABORT (); /* #### This should never happen now that we automatically create temporary charsets as necessary. We should probably remove this code. --ben */ @@ -2241,7 +2241,7 @@ break; default: - abort (); + ABORT (); } } char_boundary = 0; @@ -2335,7 +2335,7 @@ } break; default: - abort (); + ABORT (); } } }
--- a/src/native-gtk-toolbar.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/native-gtk-toolbar.c Mon Jan 24 23:34:34 2005 +0000 @@ -49,7 +49,7 @@ (frame)->right_toolbar_was_visible = flag; \ break; \ default: \ - abort (); \ + ABORT (); \ } \ } while (0)
--- a/src/number.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/number.c Mon Jan 24 23:34:34 2005 +0000 @@ -401,7 +401,7 @@ return BIGFLOAT_T; #endif /* Catch unintentional bad uses of this function */ - abort (); + ABORT (); /* NOTREACHED */ return FIXNUM_T; } @@ -425,7 +425,7 @@ number = make_int (marker_position (number)); /* Note that CHECK_NUMBER ensures that NUMBER is a supported type. Hence, - we abort() in the #else sections below, because it shouldn't be possible + we ABORT() in the #else sections below, because it shouldn't be possible to arrive there. */ CHECK_NUMBER (number); current_type = get_number_type (number); @@ -440,13 +440,13 @@ #ifdef HAVE_BIGNUM return make_bignum (XREALINT (number)); #else - abort (); + ABORT (); #endif /* HAVE_BIGNUM */ case RATIO_T: #ifdef HAVE_RATIO return make_ratio (XREALINT (number), 1UL); #else - abort (); + ABORT (); #endif /* HAVE_RATIO */ case FLOAT_T: return make_float (XREALINT (number)); @@ -454,7 +454,7 @@ #ifdef HAVE_BIGFLOAT return make_bigfloat (XREALINT (number), precision); #else - abort (); + ABORT (); #endif /* HAVE_BIGFLOAT */ } case BIGNUM_T: @@ -470,7 +470,7 @@ bignum_set_long (scratch_bignum, 1L); return make_ratio_bg (XBIGNUM_DATA (number), scratch_bignum); #else - abort (); + ABORT (); #endif /* HAVE_RATIO */ case FLOAT_T: return make_float (bignum_to_double (XBIGNUM_DATA (number))); @@ -483,11 +483,11 @@ return temp; } #else - abort (); + ABORT (); #endif /* HAVE_BIGFLOAT */ } #else - abort (); + ABORT (); #endif /* HAVE_BIGNUM */ case RATIO_T: #ifdef HAVE_RATIO @@ -514,11 +514,11 @@ return temp; } #else - abort (); + ABORT (); #endif /* HAVE_BIGFLOAT */ } #else - abort (); + ABORT (); #endif /* HAVE_RATIO */ case FLOAT_T: switch (type) @@ -530,14 +530,14 @@ bignum_set_double (scratch_bignum, XFLOAT_DATA (number)); return make_bignum_bg (scratch_bignum); #else - abort (); + ABORT (); #endif /* HAVE_BIGNUM */ case RATIO_T: #ifdef HAVE_RATIO ratio_set_double (scratch_ratio, XFLOAT_DATA (number)); return make_ratio_rt (scratch_ratio); #else - abort (); + ABORT (); #endif /* HAVE_RATIO */ case FLOAT_T: return number; @@ -547,7 +547,7 @@ bigfloat_set_double (scratch_bigfloat, XFLOAT_DATA (number)); return make_bigfloat_bf (scratch_bigfloat); #else - abort (); + ABORT (); #endif /* HAVE_BIGFLOAT */ } case BIGFLOAT_T: @@ -561,14 +561,14 @@ bignum_set_bigfloat (scratch_bignum, XBIGFLOAT_DATA (number)); return make_bignum_bg (scratch_bignum); #else - abort (); + ABORT (); #endif /* HAVE_BIGNUM */ case RATIO_T: #ifdef HAVE_RATIO ratio_set_bigfloat (scratch_ratio, XBIGFLOAT_DATA (number)); return make_ratio_rt (scratch_ratio); #else - abort (); + ABORT (); #endif case FLOAT_T: return make_float (bigfloat_to_double (XBIGFLOAT_DATA (number))); @@ -577,10 +577,10 @@ return number; } #else - abort (); + ABORT (); #endif /* HAVE_BIGFLOAT */ } - abort (); + ABORT (); /* NOTREACHED */ return Qzero; }
--- a/src/objects-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/objects-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -1937,7 +1937,7 @@ else if (DEVICE_MSPRINTER_P (d)) font_list = DEVICE_MSPRINTER_FONTLIST (d); else - abort (); + ABORT (); LIST_LOOP (fonttail, font_list) {
--- a/src/objects.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/objects.c Mon Jan 24 23:34:34 2005 +0000 @@ -618,7 +618,7 @@ XVECTOR_DATA (instantiator)[1], domain, ERROR_ME, 0, depth)); default: - abort (); + ABORT (); } } else if (NILP (instantiator)) @@ -630,7 +630,7 @@ device); } else - abort (); /* The spec validation routines are screwed up. */ + ABORT (); /* The spec validation routines are screwed up. */ return Qunbound; } @@ -894,7 +894,7 @@ else if (NILP (instantiator)) return Qunbound; else - abort (); /* Eh? */ + ABORT (); /* Eh? */ return Qunbound; } @@ -1025,7 +1025,7 @@ return retval; } else - abort (); /* Eh? */ + ABORT (); /* Eh? */ return Qunbound; }
--- a/src/print.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/print.c Mon Jan 24 23:34:34 2005 +0000 @@ -1151,7 +1151,7 @@ } } -#define ONE_DIGIT(figure) *p++ = n / (figure) + '0' +#define ONE_DIGIT(figure) *p++ = (char) (n / (figure) + '0') #define ONE_DIGIT_ADVANCE(figure) (ONE_DIGIT (figure), n %= (figure)) #define DIGITS_1(figure) ONE_DIGIT (figure) @@ -1503,7 +1503,7 @@ if (!inhibit_non_essential_conversion_operations) { #ifdef ERROR_CHECK_TYPES - abort (); + ABORT (); #else /* not ERROR_CHECK_TYPES */ if (print_readably) signal_ferror (Qinternal_error, "printing %s", buf);
--- a/src/process-nt.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/process-nt.c Mon Jan 24 23:34:34 2005 +0000 @@ -1111,7 +1111,7 @@ chunklen = Lstream_read (lstream, chunkbuf, 512); if (chunklen <= 0) - break; /* perhaps should abort() if < 0? + break; /* perhaps should ABORT() if < 0? This should never happen. */ /* Lstream_write() will never successfully write less than the
--- a/src/process-unix.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/process-unix.c Mon Jan 24 23:34:34 2005 +0000 @@ -1517,7 +1517,7 @@ chunklen = Lstream_read (lstream, chunkbuf, 512); if (chunklen <= 0) - break; /* perhaps should abort() if < 0? + break; /* perhaps should ABORT() if < 0? This should never happen. */ old_sigpipe = (SIGTYPE (*) (int)) EMACS_SIGNAL (SIGPIPE, send_process_trap);
--- a/src/process.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/process.c Mon Jan 24 23:34:34 2005 +0000 @@ -382,7 +382,7 @@ #endif /* This may be called during a GC from process_send_signal() from - kill_buffer_processes() if emacs decides to abort(). */ + kill_buffer_processes() if emacs decides to ABORT(). */ if (PROCESSP (name)) return name; else if (STRINGP (name))
--- a/src/ralloc.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/ralloc.c Mon Jan 24 23:34:34 2005 +0000 @@ -256,7 +256,7 @@ } if (! heap) - abort (); + ABORT (); /* If we can't fit SIZE bytes in that heap, try successive later heaps. */ @@ -362,7 +362,7 @@ /* This heap should have no blocs in it. */ if (last_heap->first_bloc != NIL_BLOC || last_heap->last_bloc != NIL_BLOC) - abort (); + ABORT (); /* Return the last heap, with its header, to the system. */ excess = (char *)last_heap->end - (char *)last_heap->start; @@ -377,7 +377,7 @@ } if ((*real_morecore) (- excess) == 0) - abort (); + ABORT (); } } @@ -480,7 +480,7 @@ /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) - abort(); + ABORT(); while (b) { @@ -635,7 +635,7 @@ /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) - abort(); + ABORT(); if (bloc == NIL_BLOC || size == bloc->size) return 1; @@ -647,7 +647,7 @@ } if (heap == NIL_HEAP) - abort (); + ABORT (); old_size = bloc->size; bloc->size = size; @@ -978,7 +978,7 @@ dead_bloc = find_bloc (ptr); if (dead_bloc == NIL_BLOC) - abort (); + ABORT (); free_bloc (dead_bloc); *ptr = 0; @@ -1023,7 +1023,7 @@ bloc = find_bloc (ptr); if (bloc == NIL_BLOC) - abort (); + ABORT (); if (size < bloc->size) { @@ -1093,7 +1093,7 @@ init_ralloc (); if (--r_alloc_freeze_level < 0) - abort (); + ABORT (); /* This frees all unused blocs. It is not too inefficient, as the resize and memmove is done only once. Afterwards, all unreferenced blocs are @@ -1137,7 +1137,7 @@ first_heap->start = first_heap->bloc_start = virtual_break_value = break_value = (*real_morecore) (0); if (break_value == NIL) - abort (); + ABORT (); page_size = PAGE; extra_bytes = ROUNDUP (50000); @@ -1813,13 +1813,13 @@ { if (p->addr == addr) { - if (p->sz != sz) abort(); /* ACK! Shouldn't happen at all. */ + if (p->sz != sz) ABORT(); /* ACK! Shouldn't happen at all. */ munmap( (VM_ADDR) p->addr, p->sz ); p->flag = empty; break; } } - if (!p) abort(); /* Can't happen... we've got a block to free which is not in + if (!p) ABORT(); /* Can't happen... we've got a block to free which is not in the address list. */ Coalesce_Addr_Blocks(); } @@ -1867,7 +1867,7 @@ switch(r_alloc_initialized) { case 0: - abort(); + ABORT(); case 1: *ptr = (POINTER) UNDERLYING_MALLOC(size); break; @@ -1910,7 +1910,7 @@ switch( r_alloc_initialized) { case 0: - abort(); + ABORT(); case 1: UNDERLYING_FREE( *ptr ); /* Certain this is from the heap. */ @@ -1954,7 +1954,7 @@ if (r_alloc_initialized == 0) { - abort (); + ABORT (); return 0; /* suppress compiler warning */ } else if (r_alloc_initialized == 1)
--- a/src/rangetab.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/rangetab.c Mon Jan 24 23:34:34 2005 +0000 @@ -75,7 +75,7 @@ return Qstart_open_end_closed; } - abort (); + ABORT (); return Qnil; } @@ -119,7 +119,7 @@ case RANGE_START_CLOSED_END_CLOSED: so = 0, ec = 1; break; case RANGE_START_OPEN_END_OPEN: so = 1, ec = 0; break; case RANGE_START_OPEN_END_CLOSED: so = 1; ec = 1; break; - default: abort (); so = 0, ec = 0; break; + default: ABORT (); so = 0, ec = 0; break; } write_fmt_string (printcharfun, "%c%ld %ld%c ", print_readably ? '(' : so ? '(' : '[', @@ -652,7 +652,7 @@ if (EQ (key, Qtype)) type = value; else if (EQ (key, Qdata)) data = value; else - abort (); + ABORT (); } rangetab = Fmake_range_table (type);
--- a/src/redisplay-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/redisplay-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -458,7 +458,7 @@ break; case IMAGE_POINTER: - abort (); + ABORT (); case IMAGE_WIDGET: if (EQ (XIMAGE_INSTANCE_WIDGET_TYPE (instance), @@ -482,14 +482,14 @@ break; default: - abort (); + ABORT (); } xpos += rb->width; elt++; } else - abort (); + ABORT (); } }
--- a/src/redisplay-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/redisplay-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -1079,7 +1079,7 @@ case IMAGE_TEXT: case IMAGE_POINTER: default: - abort (); + ABORT (); } IMAGE_INSTANCE_OPTIMIZE_OUTPUT (XIMAGE_INSTANCE (instance)) = 0; @@ -1088,7 +1088,7 @@ elt++; } else - abort (); + ABORT (); } }
--- a/src/redisplay-output.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/redisplay-output.c Mon Jan 24 23:34:34 2005 +0000 @@ -419,7 +419,7 @@ else if (start_pos <= bounds.right_out) *next_start = bounds.right_out; else - abort (); + ABORT (); } for (block = 0; block < Dynarr_length (dba); block++) @@ -462,7 +462,7 @@ int defheight, defwidth; if (Dynarr_length (db->runes) <= cursor_location) - abort (); + ABORT (); window = wrap_window (w); @@ -1610,7 +1610,7 @@ case IMAGE_POINTER: default: - abort (); + ABORT (); } } IMAGE_INSTANCE_OPTIMIZE_OUTPUT (childii) = 0; @@ -1722,7 +1722,7 @@ f = XFRAME (locale); } else - abort (); + ABORT (); d = XDEVICE (f->device);
--- a/src/redisplay-tty.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/redisplay-tty.c Mon Jan 24 23:34:34 2005 +0000 @@ -355,7 +355,7 @@ case IMAGE_TEXT: case IMAGE_POINTER: default: - abort (); + ABORT (); } IMAGE_INSTANCE_OPTIMIZE_OUTPUT (XIMAGE_INSTANCE (instance)) = 0; @@ -365,7 +365,7 @@ elt++; } else - abort (); + ABORT (); } }
--- a/src/redisplay-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/redisplay-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -484,7 +484,7 @@ case IMAGE_TEXT: case IMAGE_POINTER: default: - abort (); + ABORT (); } IMAGE_INSTANCE_OPTIMIZE_OUTPUT (XIMAGE_INSTANCE (instance)) = 0; @@ -494,7 +494,7 @@ elt++; } else - abort (); + ABORT (); } }
--- a/src/redisplay.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/redisplay.c Mon Jan 24 23:34:34 2005 +0000 @@ -1764,7 +1764,7 @@ } break; default: - abort (); + ABORT (); } } @@ -1959,7 +1959,7 @@ /* Otherwise something is screwed up. */ else - abort (); + ABORT (); } face = glyph_face (gb->glyph, data->window); @@ -2067,7 +2067,7 @@ return NULL; } else - abort (); /* there are no unknown types */ + ABORT (); /* there are no unknown types */ } return NULL; @@ -3098,7 +3098,7 @@ struct glyph_block *gb = Dynarr_atp (gbd, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (gb->active && ((side == LEFT_GLYPHS && @@ -3183,7 +3183,7 @@ struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) { @@ -3235,7 +3235,7 @@ struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) @@ -3304,7 +3304,7 @@ struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) @@ -3346,7 +3346,7 @@ struct glyph_block *gb = Dynarr_atp (dl->left_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_begin_glyph_layout (XEXTENT (gb->extent)) == GL_OUTSIDE_MARGIN) @@ -3504,7 +3504,7 @@ struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_WHITESPACE) { @@ -3554,7 +3554,7 @@ struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) { @@ -3618,7 +3618,7 @@ struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_INSIDE_MARGIN) { @@ -3659,7 +3659,7 @@ struct glyph_block *gb = Dynarr_atp (dl->right_glyphs, elt); if (NILP (gb->extent)) - abort (); /* these should have been handled in add_glyph_rune */ + ABORT (); /* these should have been handled in add_glyph_rune */ if (extent_end_glyph_layout (XEXTENT (gb->extent)) == GL_OUTSIDE_MARGIN) { @@ -5528,7 +5528,7 @@ /* The lines had better exist by this point. */ if (!(dla = window_display_lines (w, type))) - abort (); + ABORT (); Dynarr_reset (dla); w->max_line_len = 0; @@ -5728,7 +5728,7 @@ dla_start = 0; \ } \ else \ - abort (); /* structs differ */ \ + ABORT (); /* structs differ */ \ \ dla_end = Dynarr_length (cdla) - 1; \ } \ @@ -7989,7 +7989,7 @@ else if (point < start) top = pos - 1; else - abort (); + ABORT (); new_pos = (bottom + top + 1) >> 1; if (pos == new_pos)
--- a/src/regex.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/regex.c Mon Jan 24 23:34:34 2005 +0000 @@ -82,6 +82,8 @@ #include "compiler.h" /* Get compiler-specific definitions like UNUSED */ +#define ABORT abort + /* If we are not linking with Emacs proper, we can't use the relocating allocator even if config.h says that we can. */ @@ -293,7 +295,7 @@ we could still be screwed. So we set up a system where we indicate all places where we are prepared for malloc() or alloca(), and in any other circumstances, calls to those functions (from anywhere inside of - XEmacs!) will abort(). We do this even when REL_ALLOC is not defined + XEmacs!) will ABORT(). We do this even when REL_ALLOC is not defined so that we catch these problems sooner, since many developers and beta testers will not be running with REL_ALLOC. */ int regex_malloc_disallowed; @@ -4144,7 +4146,7 @@ default: - abort (); /* We have listed all the cases. */ + ABORT (); /* We have listed all the cases. */ } /* switch *p++ */ /* Getting here means we have found the possible starting @@ -6347,7 +6349,7 @@ #endif /* emacs */ default: - abort (); + ABORT (); } continue; /* Successfully executed one pattern command; keep going. */ @@ -6973,7 +6975,7 @@ to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ - abort (); + ABORT (); msg = gettext (re_error_msgid[errcode]);
--- a/src/s/windowsnt.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/s/windowsnt.h Mon Jan 24 23:34:34 2005 +0000 @@ -159,13 +159,6 @@ files. */ #define XCDECL __cdecl -/* MSVC 6.0 has a mechanism to declare functions which never return */ -#if (_MSC_VER >= 1200) -#define DOESNT_RETURN_TYPE(rettype) __declspec(noreturn) rettype -#define DECLARE_DOESNT_RETURN_TYPE(rettype,decl) \ - __declspec(noreturn) rettype XCDECL decl -#endif /* MSVC 6.0 */ - /* MSVC warnings no-no crap. When adding one to this section, 1. Think twice. 2. Insert textual description of the warning. @@ -179,13 +172,16 @@ #endif /* compiler understands #pragma warning*/ +#if (_MSC_VER >= 1300) +/* function declared with __declspec(noreturn) has non-void return type; + Lisp primitives have to be declared with Lisp_Object return type or + lots of things get very messed up */ +#pragma warning ( disable : 4646 ) +#endif + /* MSVC version >= 2.x without /Za supports __inline */ #if (_MSC_VER < 900) || defined (__STDC__) # define inline #else # define inline __inline #endif - -/* lisp.h defines abort() as a macro. therefore, we must include all - files that contain prototypes for abort() before then. */ -#include <../include/process.h>
--- a/src/scrollbar-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/scrollbar-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -368,7 +368,7 @@ } break; default: - abort (); + ABORT (); } } @@ -443,7 +443,7 @@ event_data = Fcons (win, make_int ((int)adj->value)); break; default: - abort(); + ABORT(); } signal_special_gtk_user_event (frame, event_type, event_data);
--- a/src/scrollbar-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/scrollbar-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -281,7 +281,7 @@ } } - if (!wv->scrollbar_data) abort (); + if (!wv->scrollbar_data) ABORT (); free_widget_value_tree (wv); } else if (managed) @@ -367,7 +367,7 @@ } break; default: - abort (); + ABORT (); } }
--- a/src/search.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/search.c Mon Jan 24 23:34:34 2005 +0000 @@ -1170,7 +1170,7 @@ if (!EQ (noerror, Qt)) { if (lim < BUF_BEGV (buf) || lim > BUF_ZV (buf)) - abort (); + ABORT (); BUF_SET_PT (buf, lim); return Qnil; #if 0 /* This would be clean, but maybe programs depend on @@ -1183,7 +1183,7 @@ } if (np < BUF_BEGV (buf) || np > BUF_ZV (buf)) - abort (); + ABORT (); BUF_SET_PT (buf, np); @@ -2938,7 +2938,7 @@ } else /* last_thing_searched must always be Qt, a buffer, or Qnil. */ - abort (); + ABORT (); len = i; }
--- a/src/select-x.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/select-x.c Mon Jan 24 23:34:34 2005 +0000 @@ -392,7 +392,7 @@ Window window = (Window) *private_id; Lisp_Object selection = select_convert_out (QCLIPBOARD, Qnil, Qnil); - /* Whichever lazy git wrote this originally just called abort() + /* Whichever lazy git wrote this originally just called ABORT() when anything didn't go their way... */ /* Try some other text types */
--- a/src/signal.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/signal.c Mon Jan 24 23:34:34 2005 +0000 @@ -258,7 +258,7 @@ /* If alarm() gets called when polling isn't disabled, it will mess up the asynchronous timeouts, and then C-g checking won't work again. Some libraries call alarm() directly, so we override the standard - library's alarm() and abort() if the caller of the library function + library's alarm() and ABORT() if the caller of the library function didn't wrap in stop_interrupts()/start_interrupts(). NOTE: We could potentially avoid the need to wrap by adding a @@ -311,7 +311,7 @@ case ITIMER_REAL: return setitimer (ITIMER_REAL, itnew, itold); case ITIMER_VIRTUAL: return setitimer (ITIMER_VIRTUAL, itnew, itold); case ITIMER_PROF: return setitimer (ITIMER_PROF, itnew, itold); - default: abort (); return 0; + default: ABORT (); return 0; } #endif } @@ -614,7 +614,7 @@ c = getc (stdin); stdout_out ("Abort (and dump core)? (y or n) "); if (((c = getc (stdin)) & ~040) == 'Y') - abort (); + ABORT (); while (c != '\n') c = getc (stdin); stdout_out ("Continuing...\n");
--- a/src/specifier.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/specifier.c Mon Jan 24 23:34:34 2005 +0000 @@ -1775,7 +1775,7 @@ tem = nconc2 (*orig_inst_list, list_to_build_up); else { - abort (); + ABORT (); tem = Qnil; } @@ -2567,7 +2567,7 @@ No. Errors are handled in Lisp primitives implementation. Invalid domain is a design error here - kkm. */ - abort (); + ABORT (); if (NILP (buffer) && !NILP (window)) buffer = WINDOW_BUFFER (XWINDOW (window));
--- a/src/specifier.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/specifier.h Mon Jan 24 23:34:34 2005 +0000 @@ -434,7 +434,7 @@ /* #### get image instances out of domains! */ -/* #### I think the following should abort() rather than return nil +/* #### I think the following should ABORT() rather than return nil when an invalid domain is given; much more likely we'll catch design errors early. --ben */
--- a/src/strftime.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/strftime.c Mon Jan 24 23:34:34 2005 +0000 @@ -197,7 +197,7 @@ char buf[40]; if (sizeof (num) > 16) - abort (); + ABORT (); sprintf (buf, "%lu", (unsigned long) num); return add_str (string, buf, max); }
--- a/src/sunplay.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/sunplay.c Mon Jan 24 23:34:34 2005 +0000 @@ -54,7 +54,7 @@ reset_volume_p = 0; reset_device_p = 0; - if (data && fd) abort (); /* one or the other */ + if (data && fd) ABORT (); /* one or the other */ if (AUDIO_SUCCESS != audio_get_play_config (audio_fd, &dev_hdr)) {
--- a/src/symbols.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/symbols.c Mon Jan 24 23:34:34 2005 +0000 @@ -1113,7 +1113,7 @@ return valcontents; default: - abort (); + ABORT (); } return Qnil; /* suppress compiler warning */ } @@ -1289,7 +1289,7 @@ return; default: - abort (); + ABORT (); } } } @@ -1914,7 +1914,7 @@ break; } default: - abort (); + ABORT (); } store_symval_forwarding (symbol, valcontents, newval); @@ -2181,7 +2181,7 @@ return variable; default: - abort (); + ABORT (); } } @@ -2290,7 +2290,7 @@ } default: - abort (); + ABORT (); } } @@ -2364,7 +2364,7 @@ break; default: - abort (); + ABORT (); } } @@ -2682,7 +2682,7 @@ case SYMVAL_UNBOUND_MARKER: return Qnil; default: - abort (); return Qnil; + ABORT (); return Qnil; } } @@ -2912,7 +2912,7 @@ return MAGIC_HANDLER_MAKE_LOCAL; if (abort_if_not_found) - abort (); + ABORT (); invalid_argument ("Unrecognized symbol-value function", funsym); RETURN_NOT_REACHED (MAGIC_HANDLER_MAX); }
--- a/src/sysdep.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/sysdep.c Mon Jan 24 23:34:34 2005 +0000 @@ -958,7 +958,7 @@ sg.sg_ospeed = B9600; if (ioctl (input_fd, TIOCGETP, &sg) < 0) - abort (); + ABORT (); DEVICE_TTY_DATA (d)->ospeed = sg.sg_ospeed; #endif }
--- a/src/sysproc.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/sysproc.h Mon Jan 24 23:34:34 2005 +0000 @@ -42,7 +42,7 @@ VC4.2b, 5.0 and 6.0. It assumes that VC is installed in a kind of standard way, so include path ends with /include. NOTE: We also include this same file in s/windowsnt.h, to avoid problems - because this file prototypes abort() and then lisp.h defines it as a + because this file prototypes ABORT() and then lisp.h defines it as a macro, which must happen after the prototype. DO NOT remove the include here just because you "know" it's somewhere else as well. */
--- a/src/syswindows.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/syswindows.h Mon Jan 24 23:34:34 2005 +0000 @@ -579,6 +579,38 @@ #endif BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4); +/* would be encapsulatable but for header changes in different versions of VC++ */ + +#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED +#undef EnumResourceTypes +#define EnumResourceTypes error_use_qxeEnumResourceTypes_or_EnumResourceTypesA_and_EnumResourceTypesW +#endif +#if MSC_VERSION >= 1300 +BOOL qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG lParam); +#else +BOOL qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROC lpEnumFunc, LONG lParam); +#endif + +#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED +#undef EnumResourceNames +#define EnumResourceNames error_use_qxeEnumResourceNames_or_EnumResourceNamesA_and_EnumResourceNamesW +#endif +#if MSC_VERSION >= 1300 +BOOL qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG lParam); +#else +BOOL qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam); +#endif + +#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED +#undef EnumResourceLanguages +#define EnumResourceLanguages error_use_qxeEnumResourceLanguages_or_EnumResourceLanguagesA_and_EnumResourceLanguagesW +#endif +#if MSC_VERSION >= 1300 +BOOL qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROCW lpEnumFunc, LONG lParam); +#else +BOOL qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROC lpEnumFunc, LONG lParam); +#endif + /* files */ #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED #undef FindFirstFile @@ -678,17 +710,33 @@ #endif HFONT qxeCreateFontIndirect (CONST LOGFONTW *lplf); +#if defined (HAVE_MS_WINDOWS) #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED #undef ImmSetCompositionFont #define ImmSetCompositionFont error use qxeImmSetCompositionFont or ImmSetCompositionFontA/ImmSetCompositionFontW #endif BOOL qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf); +#endif /* defined (HAVE_MS_WINDOWS) */ +#if defined (HAVE_MS_WINDOWS) #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED #undef ImmGetCompositionFont #define ImmGetCompositionFont error use qxeImmGetCompositionFont or ImmGetCompositionFontA/ImmGetCompositionFontW #endif BOOL qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf); +#endif /* defined (HAVE_MS_WINDOWS) */ + +#if defined (HAVE_MS_WINDOWS) +#ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED +#undef ImmSetCompositionString +#define ImmSetCompositionString error_use_qxeImmSetCompositionString_or_ImmSetCompositionStringA_and_ImmSetCompositionStringW +#endif +#if MSC_VERSION >= 1300 +BOOL qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6); +#else +BOOL qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6); +#endif +#endif /* defined (HAVE_MS_WINDOWS) */ #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED #undef GetObject
--- a/src/text.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/text.c Mon Jan 24 23:34:34 2005 +0000 @@ -2709,7 +2709,7 @@ } #ifdef ERROR_CHECK_TEXT else if (x >= bufmin) - abort (); + ABORT (); #endif else { @@ -3202,7 +3202,7 @@ } #ifdef ERROR_CHECK_TEXT else if (x >= bytmin) - abort (); + ABORT (); #endif else { @@ -4492,7 +4492,7 @@ src expression. (We use the stringize operator to avoid evaluating the expression multiple times.) If the caller uses the exact same src expression twice in two converter calls in the same subexpression, we - will lose, but at least we can check for this and abort(). We could + will lose, but at least we can check for this and ABORT(). We could conceivably try to index on other parameters as well, but there is not really any point. */ @@ -4573,7 +4573,7 @@ break; default: - abort (); + ABORT (); } /* The size is always + 2 because we have double zero-termination at the
--- a/src/text.h Mon Jan 24 22:51:18 2005 +0000 +++ b/src/text.h Mon Jan 24 23:34:34 2005 +0000 @@ -1422,10 +1422,10 @@ the specific format). void eicpy_ascii (Eistring *eistr, const Ascbyte *ascstr); ... from an ASCII null-terminated string. Non-ASCII characters in - the string are *ILLEGAL* (read abort() with error-checking defined). + the string are *ILLEGAL* (read ABORT() with error-checking defined). void eicpy_ascii_len (Eistring *eistr, const Ascbyte *ascstr, len); ... from an ASCII string, with length specified. Non-ASCII characters - in the string are *ILLEGAL* (read abort() with error-checking defined). + in the string are *ILLEGAL* (read ABORT() with error-checking defined). void eicpy_ext (Eistring *eistr, const Extbyte *extdata, Lisp_Object codesys); ... from external null-terminated data, with coding system specified. @@ -1565,7 +1565,7 @@ ... from another Eistring. void eicat_ascii (Eistring *eistr, Ascbyte *ascstr); ... from an ASCII null-terminated string. Non-ASCII characters in - the string are *ILLEGAL* (read abort() with error-checking defined). + the string are *ILLEGAL* (read ABORT() with error-checking defined). void eicat_raw (ei, const Ibyte *data, Bytecount len); ... from raw internal-format data in the default internal format. void eicat_rawz (ei, const Ibyte *data); @@ -1595,7 +1595,7 @@ void eisub_ascii (Eistring *eistr, Bytecount off, Charcount charoff, Bytecount len, Charcount charlen, Ascbyte *ascstr); ... with an ASCII null-terminated string. Non-ASCII characters in - the string are *ILLEGAL* (read abort() with error-checking defined). + the string are *ILLEGAL* (read ABORT() with error-checking defined). void eisub_ch (Eistring *eistr, Bytecount off, Charcount charoff, Bytecount len, Charcount charlen, Ichar ch); ... with an Ichar.
--- a/src/toolbar-common.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/toolbar-common.c Mon Jan 24 23:34:34 2005 +0000 @@ -63,9 +63,9 @@ #define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_X_P (f)) #define __INTERNAL_FLUSH(d) XFlush (DEVICE_X_DISPLAY (d)) #else -#define __INTERNAL_MAPPED_P(f) abort() -#define __INTERNAL_APPROPRIATENESS_CHECK(f) abort() -#define __INTERNAL_FLUSH(f) abort() +#define __INTERNAL_MAPPED_P(f) ABORT() +#define __INTERNAL_APPROPRIATENESS_CHECK(f) ABORT() +#define __INTERNAL_FLUSH(f) ABORT() #endif #include "toolbar-common.h" @@ -445,7 +445,7 @@ (frame)->right_toolbar_was_visible = flag; \ break; \ default: \ - abort (); \ + ABORT (); \ } \ } while (0)
--- a/src/toolbar-msw.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/toolbar-msw.c Mon Jan 24 23:34:34 2005 +0000 @@ -78,7 +78,7 @@ (frame)->right_toolbar_was_visible = flag; \ break; \ default: \ - abort (); \ + ABORT (); \ } \ } while (0)
--- a/src/toolbar.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/toolbar.c Mon Jan 24 23:34:34 2005 +0000 @@ -933,7 +933,7 @@ *vert = 1; break; default: - abort (); + ABORT (); } }
--- a/src/ui-gtk.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/ui-gtk.c Mon Jan 24 23:34:34 2005 +0000 @@ -1180,7 +1180,7 @@ emacs_gtk_boxed_data *data = NULL; if (GTK_FUNDAMENTAL_TYPE (t) != GTK_TYPE_BOXED) - abort(); + ABORT(); data = allocate_emacs_gtk_boxed_data (); data->object = obj; @@ -1446,13 +1446,13 @@ /* structured types */ case GTK_TYPE_SIGNAL: case GTK_TYPE_ARGS: /* This we can do as a list of values */ - abort(); + ABORT(); case GTK_TYPE_CALLBACK: stderr_out ("callback fn: ...\n"); break; case GTK_TYPE_C_CALLBACK: case GTK_TYPE_FOREIGN: - abort(); + ABORT(); /* base type of the object system */ case GTK_TYPE_OBJECT: @@ -1463,7 +1463,7 @@ break; default: - abort(); + ABORT(); } } #endif @@ -1544,7 +1544,7 @@ } } stderr_out ("Do not know how to convert `%s' to lisp!\n", gtk_type_name (arg->type)); - abort (); + ABORT (); } /* This is chuck reminding GCC to... SHUT UP! */ return (Qnil); @@ -1597,7 +1597,7 @@ break; case GTK_TYPE_LONG: case GTK_TYPE_ULONG: - abort(); + ABORT(); case GTK_TYPE_FLOAT: CHECK_INT_OR_FLOAT (obj); GTK_VALUE_FLOAT(*arg) = extract_float (obj); @@ -1816,7 +1816,7 @@ else { stderr_out ("Do not know how to convert `%s' from lisp!\n", gtk_type_name (arg->type)); - abort(); + ABORT(); } break; } @@ -1877,7 +1877,7 @@ break; case GTK_TYPE_LONG: case GTK_TYPE_ULONG: - abort(); + ABORT(); case GTK_TYPE_FLOAT: CHECK_INT_OR_FLOAT (obj); *(GTK_RETLOC_FLOAT(*arg)) = extract_float (obj); @@ -2096,7 +2096,7 @@ else { stderr_out ("Do not know how to convert `%s' from lisp!\n", gtk_type_name (arg->type)); - abort(); + ABORT(); } break; } @@ -2171,7 +2171,7 @@ } else { - /* abort ()? */ + /* ABORT ()? */ } return (val); }
--- a/src/unexnt.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/unexnt.c Mon Jan 24 23:34:34 2005 +0000 @@ -526,17 +526,17 @@ file = qxeCreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (file == INVALID_HANDLE_VALUE) - abort (); + ABORT (); /* Seek to where the .bss section is tucked away after the heap... */ index = heap_index_in_executable + get_committed_heap_size (); if (SetFilePointer (file, index, NULL, FILE_BEGIN) == 0xFFFFFFFF) - abort (); + ABORT (); /* Ok, read in the saved .bss section and initialize all uninitialized variables. */ if (!ReadFile (file, bss_start, bss_size, &n_read, NULL)) - abort (); + ABORT (); CloseHandle (file); #endif @@ -554,13 +554,13 @@ file = qxeCreateFile (filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (file == INVALID_HANDLE_VALUE) - abort (); + ABORT (); size = GetFileSize (file, &upper_size); file_mapping = qxeCreateFileMapping (file, NULL, PAGE_WRITECOPY, 0, size, NULL); if (!file_mapping) - abort (); + ABORT (); size = get_committed_heap_size (); file_base = MapViewOfFileEx (file_mapping, FILE_MAP_COPY, 0, @@ -578,17 +578,17 @@ if (VirtualAlloc (get_heap_start (), get_committed_heap_size (), MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE) == NULL) - abort (); + ABORT (); /* Seek to the location of the heap data in the executable. */ if (SetFilePointer (file, heap_index_in_executable, NULL, FILE_BEGIN) == 0xFFFFFFFF) - abort (); + ABORT (); /* Read in the data. */ if (!ReadFile (file, get_heap_start (), get_committed_heap_size (), &n_read, NULL)) - abort (); + ABORT (); CloseHandle (file); }
--- a/src/unicode.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/unicode.c Mon Jan 24 23:34:34 2005 +0000 @@ -176,7 +176,7 @@ (1-to-1). Any character set that does not behave that way is broken according to the Unicode standard. - Answer: You will get an abort(), since the purpose of the sledgehammer + Answer: You will get an ABORT(), since the purpose of the sledgehammer routines is self-checking. The above problem with non-1-to-1 mapping occurs in the Big5 tables, as provided by the Unicode Consortium. */ @@ -406,7 +406,7 @@ return newtab; } default: - abort (); + ABORT (); return 0; } } @@ -702,7 +702,7 @@ break; } default: - abort (); + ABORT (); } } @@ -749,7 +749,7 @@ case 2: val = ((short **) frtab)[u2][u1]; break; case 3: val = ((short ***) frtab)[u3][u2][u1]; break; case 4: val = ((short ****) frtab)[u4][u3][u2][u1]; break; - default: abort (); + default: ABORT (); } ch = make_ichar (charset, val >> 8, val & 0xFF); @@ -772,7 +772,7 @@ case 1: assert_not_any_blank_table (frtab); break; - default: abort (); + default: ABORT (); } } } @@ -796,7 +796,7 @@ break; } default: - abort (); + ABORT (); } } @@ -917,7 +917,7 @@ case 4: ((short ****) table)[0] = (short ***) old_table; break; - default: abort (); + default: ABORT (); } } } @@ -953,7 +953,7 @@ ((short *) create_new_from_unicode_table (1)); table = ((short **) table)[u2]; break; - default: abort (); + default: ABORT (); } } } @@ -968,7 +968,7 @@ case 2: ((short **) table)[u2][u1] = (c1 << 8) + c2; break; case 3: ((short ***) table)[u3][u2][u1] = (c1 << 8) + c2; break; case 4: ((short ****) table)[u4][u3][u2][u1] = (c1 << 8) + c2; break; - default: abort (); + default: ABORT (); } } } @@ -1031,7 +1031,7 @@ case 2: retval = ((short **) table)[u2][u1]; break; case 3: retval = ((short ***) table)[u3][u2][u1]; break; case 4: retval = ((short ****) table)[u4][u3][u2][u1]; break; - default: abort (); retval = 0; + default: ABORT (); retval = 0; } if (retval != -1) @@ -1496,7 +1496,7 @@ break; case CHARSET_TYPE_96X96: l1 = 32; h1 = 127; l2 = 32; h2 = 127; break; - default: abort (); l1 = 0; h1 = 0; l2 = 0; h2 = 0; + default: ABORT (); l1 = 0; h1 = 0; l2 = 0; h2 = 0; } if (cp1high < l2 || cp1high > h2 || cp1low < l1 || cp1low > h1) @@ -1688,9 +1688,9 @@ } break; - case UNICODE_UTF_7: abort (); + case UNICODE_UTF_7: ABORT (); - default: abort (); + default: ABORT (); } } @@ -1829,10 +1829,10 @@ break; case UNICODE_UTF_7: - abort (); + ABORT (); break; - default: abort (); + default: ABORT (); } } @@ -1959,7 +1959,7 @@ } break; default: - abort (); + ABORT (); } } } @@ -2344,7 +2344,7 @@ case UNICODE_UTF_8: return Qutf_8; case UNICODE_UTF_7: return Qutf_7; case UNICODE_UCS_4: return Qucs_4; - default: abort (); + default: ABORT (); } } else if (EQ (prop, Qlittle_endian))
--- a/src/win32.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/win32.c Mon Jan 24 23:34:34 2005 +0000 @@ -237,7 +237,7 @@ #else case 0: lang = 0; break; #endif - default: abort (); + default: ABORT (); } retval = qxeFormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER
--- a/src/window.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/window.c Mon Jan 24 23:34:34 2005 +0000 @@ -643,7 +643,7 @@ real_window_internal (mir->frame->root_window, XWINDOW_MIRROR (mir->frame->root_mirror), mir); if (NILP (retval) && !no_abort) - abort (); + ABORT (); return retval; } @@ -706,7 +706,7 @@ update_frame_window_mirror (XFRAME (w->frame)); t = find_window_mirror (w); if (!t) - abort (); + ABORT (); if (which == CURRENT_DISP) return t->current_display_lines; @@ -716,7 +716,7 @@ /* The CMOTION_DISP display lines are global. */ return cmotion_display_lines; else - abort (); + ABORT (); return 0; /* shut up compiler */ } @@ -730,7 +730,7 @@ update_frame_window_mirror (XFRAME (w->frame)); t = find_window_mirror (w); if (!t) - abort (); + ABORT (); return t->buffer; } @@ -744,7 +744,7 @@ update_frame_window_mirror (XFRAME (w->frame)); t = find_window_mirror (w); if (!t) - abort (); + ABORT (); t->buffer = b; } @@ -1963,7 +1963,7 @@ struct buffer *b = XBUFFER (buf); if (b != XMARKER (w->pointm[CURRENT_DISP])->buffer) - abort (); + ABORT (); /* FSF disables this check, so I'll do it too. I hope it won't break things. --ben */ @@ -2833,14 +2833,14 @@ I feel no shame about putting this piece of shit in. */ if (++lose_lose >= 500) { - /* Call to abort() added by Darryl Okahata (16 Nov. 2001), + /* Call to ABORT() added by Darryl Okahata (16 Nov. 2001), at Ben's request, to catch any remaining bugs. If you find that XEmacs is aborting here, and you need to be up and running ASAP, it should be safe to - comment out the following abort(), as long as you + comment out the following ABORT(), as long as you leave the "break;" alone. */ - abort(); + ABORT(); break; /* <--- KEEP THIS HERE! Do not delete! */ } @@ -2984,7 +2984,7 @@ } default: - abort (); + ABORT (); } if (EQ (w, last_window)) @@ -3076,7 +3076,7 @@ w = window_loop (GET_LRU_WINDOW, Qnil, 0, which_frames, 1, which_devices); /* At this point we damn well better have found something. */ - if (NILP (w)) abort (); + if (NILP (w)) ABORT (); #endif return w;
--- a/src/xgccache.c Mon Jan 24 22:51:18 2005 +0000 +++ b/src/xgccache.c Mon Jan 24 23:34:34 2005 +0000 @@ -158,8 +158,8 @@ struct gc_cache_cell *cell, *next, *prev; struct gcv_and_mask gcvm; - if ((!!cache->head) != (!!cache->tail)) abort (); - if (cache->head && (cache->head->prev || cache->tail->next)) abort (); + if ((!!cache->head) != (!!cache->tail)) ABORT (); + if (cache->head && (cache->head->prev || cache->tail->next)) ABORT (); gcvm.mask = mask; gcvm.gcv = *gcv; /* this copies... */ @@ -208,10 +208,10 @@ cell->prev = cache->tail; cache->tail->next = cell; cache->tail = cell; - if (cache->head == cell) abort (); - if (cell->next) abort (); - if (cache->head->prev) abort (); - if (cache->tail->next) abort (); + if (cache->head == cell) ABORT (); + if (cell->next) ABORT (); + if (cache->head->prev) ABORT (); + if (cache->tail->next) ABORT (); return cell->gc; } @@ -233,7 +233,7 @@ #endif } else if (cache->size > GC_CACHE_SIZE) - abort (); + ABORT (); else { /* Allocate a new cell (don't put it in the list or table yet). */