summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog417
-rw-r--r--src/alloc.c22
-rw-r--r--src/buffer.c4
-rw-r--r--src/bytecode.c2
-rw-r--r--src/category.c3
-rw-r--r--src/coding.c9
-rw-r--r--src/config.in6
-rw-r--r--src/data.c4
-rw-r--r--src/dosfns.c2
-rw-r--r--src/editfns.c3
-rw-r--r--src/emacs.c2
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c42
-rw-r--r--src/fns.c94
-rw-r--r--src/frame.c7
-rw-r--r--src/gtkutil.c7
-rw-r--r--src/image.c59
-rw-r--r--src/indent.c11
-rw-r--r--src/keyboard.c6
-rw-r--r--src/lread.c4
-rw-r--r--src/m/amdx86-64.h8
-rw-r--r--src/m/ibmrs6000.h6
-rw-r--r--src/m/pfa50.h2
-rw-r--r--src/mac.c32
-rw-r--r--src/macfns.c60
-rw-r--r--src/macmenu.c35
-rw-r--r--src/macselect.c9
-rw-r--r--src/macterm.c232
-rw-r--r--src/macterm.h13
-rw-r--r--src/minibuf.c2
-rw-r--r--src/msdos.c2
-rw-r--r--src/process.c2
-rw-r--r--src/regex.c190
-rw-r--r--src/s/aix4-2.h14
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/s/ms-w32.h2
-rw-r--r--src/s/netbsd.h5
-rw-r--r--src/s/openbsd.h11
-rw-r--r--src/search.c2
-rw-r--r--src/sound.c16
-rw-r--r--src/strftime.c6
-rw-r--r--src/syntax.c2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/term.c1
-rw-r--r--src/termhooks.h10
-rw-r--r--src/unexcw.c2
-rw-r--r--src/unexmacosx.c223
-rw-r--r--src/w16select.c2
-rw-r--r--src/w32fns.c72
-rw-r--r--src/w32menu.c28
-rw-r--r--src/w32proc.c3
-rw-r--r--src/w32term.c8
-rw-r--r--src/window.c13
-rw-r--r--src/xdisp.c11
-rw-r--r--src/xfaces.c18
-rw-r--r--src/xfns.c44
-rw-r--r--src/xmenu.c41
-rw-r--r--src/xselect.c16
-rw-r--r--src/xsmfns.c2
-rw-r--r--src/xterm.c145
-rw-r--r--src/xterm.h10
61 files changed, 1394 insertions, 616 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 27a229b0f68..506ee83c8cb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,406 @@
-2006-10-29 Mark Davies <mark@mcs.vuw.ac.nz> (tiny change)
+2006-12-01 Eli Zaretskii <eliz@gnu.org>
+
+ * w32fns.c (Fw32_shell_execute): Doc fix.
+
+2006-11-30 Chong Yidong <cyd@stupidchicken.com>
+
+ * xdisp.c (move_it_to): Correctly count tab glyphs for continued
+ lines ending in tab.
+
+2006-11-30 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xterm.c (x_raise_frame): Move setting of _NET_ACTIVE_WINDOW
+ property ...
+ (XTframe_raise_lower): ... to here.
+
+2006-11-30 Kenichi Handa <handa@m17n.org>
+
+ * regex.c (regex_compile): Fix previous change.
+
+2006-11-29 Juanma Barranquero <lekktu@gmail.com>
+
+ * sound.c (Fplay_sound_internal): Remove spurious newline in docstring.
+
+2006-11-28 Chong Yidong <cyd@stupidchicken.com>
+
+ * config.in: Regenerate.
+
+2006-11-28 Kenichi Handa <handa@m17n.org>
+
+ * regex.c (regex_compile): Don't call SET_LIST_BIT with a
+ multibyte character.
+
+2006-11-27 Chong Yidong <cyd@stupidchicken.com>
+
+ * s/aix4-2.h: Undefine _NO_PROTO. Suggested by Joe Buehler.
+
+2006-11-27 Kim F. Storm <storm@cua.dk>
+
+ * window.c (set_window_buffer): Refactor recent changes.
+
+2006-11-27 Jason Rumney <jasonr@gnu.org>
+
+ * w32term.c (w32_msg_worker): Declare correctly.
+ (w32_initialize): Don't cast w32_msg_worker.
+
+ * w32fns.c (w32_msg_worker): Define as WINAPI and arg as void pointer.
+
+2006-11-26 Chong Yidong <cyd@stupidchicken.com>
+
+ * m/amdx86-64.h: Look for standard libs in /usr/lib64 only if that
+ directory exists.
+
+2006-11-25 Eli Zaretskii <eliz@gnu.org>
+
+ * w16select.c (Fw16_set_clipboard_data): Fix the call to sit_for
+ as per the calling sequence change on 2006-07-11.
+
+2006-11-25 Chong Yidong <cyd@stupidchicken.com>
+
+ * window.c (set_window_buffer): Use BLOCK_INPUT.
+
+2006-11-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * fns.c (substring_both): Add missing address operator.
+
+2006-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fns.c: Use AREF/ASIZE macros.
+ (concat): Provide the full ANSI prototype.
+
+2006-11-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
+
+2006-11-23 William Smith <William.Smith@global360.com> (tiny change)
+
+ * strftime.c (HAVE_SYS__MBSTATE_T_H): Fix typo.
+
+2006-11-02 Alfred M. Szmidt <ams@gnu.org> (tiny change)
+
+ * s/openbsd.h (LD_SWITCH_SYSTEM): Remove /usr/pkg/lib and
+ /usr/pkg/lib from the library search path.
+ (LD_SWITCH_X_DEFAULT): New macro.
+
+2006-11-22 Chong Yidong <cyd@stupidchicken.com>
+
+ * window.c (set_window_buffer): Clear mouse highlight if it is in
+ this window.
+
+2006-11-21 Chong Yidong <cyd@stupidchicken.com>
+
+ * xfaces.c (realize_default_face): Check if the default font name
+ exists on this display before trying to use it.
+
+2006-11-21 Richard Stallman <rms@gnu.org>
+
+ * fileio.c: Break line before &&, not after.
+
+2006-11-20 Eli Zaretskii <eliz@gnu.org>
+
+ * fns.c (concat) [!__GNUC__]: Add prototype.
+
+2006-11-20 Kenichi Handa <handa@m17n.org>
+
+ * fileio.c (Fread_file_name_internal): Use SBYTES (not SCHARS) to
+ check the tailing slash of a filename.
+
+2006-11-20 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp> (tiny change)
+
+ * indent.c (Fvertical_motion): Include composition in the case of
+ overshoot expected.
+
+2006-11-19 Andreas Schwab <schwab@gnu.org>
+
+ * xfaces.c (Fdisplay_supports_face_attributes_p): Initialize supports.
+
+ * xmenu.c (Fx_popup_menu): Initialize selection.
+
+2006-11-18 Andreas Schwab <schwab@suse.de>
+
+ * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Update call to mark_memory.
+
+2006-11-17 Tetsurou Okazaki <okazaki@be.to> (tiny change)
+
+ * xterm.c (do_ewmh_fullscreen): Declare variable before XSETFRAME
+ to avoid gcc 2.96 error.
+
+2006-11-17 NIIMI Satoshi <sa2c@sa2c.net> (tiny change)
+
+ * search.c (simple_search): In the loop of backward searching,
+ check also the byte position against the limit.
+
+2006-11-14 Romain Francoise <romain@orebokech.com>
+
+ * minibuf.c (Fcompleting_read): Fix typo in docstring.
+
+2006-11-14 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (code_convert_region): Initialize coding->heading_ascii.
+ (decode_coding_string, code_convert_region): Likewise.
+
+2006-11-14 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * config.in: Regenerate.
+
+ * macfns.c (Fx_display_mm_height, Fx_display_mm_width)
+ [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
+ CGDisplayScreenSize is available.
+
+ * macmenu.c (menu_quit_handler, install_menu_quit_handler):
+ Replace `#ifdef HAVE_CANCELMENUTRACKING' with
+ `#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030'.
+ (install_menu_quit_handler) [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
+ CancelMenuTracking is available.
+
+ * macterm.c [USE_CG_TEXT_DRAWING] (mac_draw_image_string_cg)
+ [MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ && MAC_OS_X_VERSION_MIN_REQUIRED == 1020]: Check if
+ CGContextShowGlyphsWithAdvances is available.
+
+2006-11-13 Jason Rumney <jasonr@gnu.org>
+
+ * s/ms-w32.h: Define HAVE_INET_SOCKETS.
+
+2006-11-13 Nozomu Ando <nand@mac.com>
+
+ * alloc.c (mark_memory): New argument OFFSET. All uses changed.
+ Fix address calculations for case END < START.
+ (mark_stack): Impose Lisp_Object alignment on jmp_buf.
+
+2006-11-12 Juanma Barranquero <lekktu@gmail.com>
+
+ * coding.c (Fencode_sjis_char, Fencode_big5_char):
+ Improve argument/docstring consistency.
+
+ * editfns.c (Fmessage): Doc fixes.
+
+ * process.c (syms_of_process) <delete-exited-processes>: Doc fix.
+
+2006-11-12 Chong Yidong <cyd@stupidchicken.com>
+
+ * xmenu.c (popup_activated): Define outside HAVE_MENUS.
+
+2006-11-12 Romain Francoise <romain@orebokech.com>
+
+ * xselect.c (selection-coding-system): Fix docstring.
+
+2006-11-12 Juanma Barranquero <lekktu@gmail.com>
+
+ * category.c (Fchar_category_set): Improve arg/docstring consistency.
+
+ * data.c (Flogxor):
+ * fns.c (Frandom, Flength, Fsafe_length, Fstring_bytes)
+ (Fstring_equal, Fcompare_strings, Fstring_lessp, Fcopy_sequence)
+ (Fstring_make_unibyte): Fix typos in docstrings.
+
+2006-11-10 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xterm.h (struct x_display_info): Fix indentation.
+
+ * xterm.c (do_ewmh_fullscreen, XTfullscreen_hook): New functions.
+ (x_check_fullscreen): Call do_ewmh_fullscreen.
+ (x_initialize): Set fullscreen_hook to XTfullscreen_hook.
+
+ * frame.c (x_set_fullscreen): Call fullscreen_hook if set.
+
+ * term.c: Define fullscreen_hook.
+ (syms_of_term): Initialize fullscreen_hook to NULL.
+
+ * termhooks.h: Add fullscreen_hook.
+
+2006-11-08 Juanma Barranquero <lekktu@gmail.com>
+
+ * bytecode.c (Fbyte_code):
+ * data.c (Fmakunbound): Use SYMBOL_CONSTANT_P macro.
+
+2006-11-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * lread.c (syms_of_lread):
+ * xsmfns.c (syms_of_xsmfns): Fix typo in docstring.
+
+2006-11-06 Martin Rudalics <rudalics@gmx.at>
+
+ * macmenu.c (Fmenu_or_popup_active_p): Define outside HAVE_MENUS.
+
+ * w32menu.c (Fmenu_or_popup_active_p): Define outside HAVE_MENUS.
+ Return nil if building without menus.
+
+ * xmenu.c (Fmenu_or_popup_active_p): Define outside HAVE_MENUS.
+ Return nil if building without menus.
+
+2006-11-05 Mark Davies <mark@mcs.vuw.ac.nz> (tiny change)
+
+ * s/netbsd.h (POSIX_SIGNALS): Define.
+
+2006-11-05 Martin Rudalics <rudalics@gmx.at>
+
+ * macmenu.c (Fmenu_or_popup_active_p): New function.
+ (syms_of_macmenu): Defsubr it.
+
+ * w32menu.c (Fmenu_or_popup_active_p): New function.
+ (syms_of_w32menu): Defsubr it.
+ (popup_activated_flag, popup_activated): Remove.
+
+ * xdisp.c (note_mouse_highlight) [HAVE_NTGUI]: Don't bother to
+ check popup_activated.
+
+ * xmenu.c (Fmenu_or_popup_active_p): New function.
+ (syms_of_xmenu): Defsubr it.
+
+2006-11-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * unexmacosx.c (malloc_cookie): Remove unused variable.
+ (region_list_head, region_list_tail, lca, nlc, infile_lc_highest_addr)
+ (text_seg_lowest_offset, mh, curr_header_offset, infd, outfd)
+ (emacs_zone, data_segment_old_fileoff, data_segment_scp)
+ (num_unexec_regions, unexec_regions): Make variables static.
+ (print_regions, find_emacs_zone_regions): Make static.
+ (unexec_region_info): New typedef.
+ (unexec_regions): Change type from vm_range_t[] to unexec_region_info[].
+ All uses changed.
+ (unexec_regions_recorder): Subtract size of trailing null pages from
+ filesize. Show filesize.
+ (unexec_regions_merge): Don't merge if null pages of preceding region
+ is not too small. Use long format in printf.
+ (copy_segment, copy_data_segment): Show filesize.
+ (copy_data_segment): Write filesize bytes of region data.
+ Adjust filesize in segment command accordingly.
+ (dump_it): Use long format in printf.
+
+2006-11-05 Juanma Barranquero <lekktu@gmail.com>
+
+ * dosfns.c (Finsert_startup_screen):
+ * fns.c (Ffeaturep, syms_of_fns):
+ * frame.c (syms_of_frame): Fix typos in docstrings.
+
+ * unexcw.c (unexec): Fix typo in output message.
+
+2006-11-04 Ralf Angeli <angeli@caeruleus.net>
+
+ * w32fns.c (w32_createwindow): Remove code for handling -geometry
+ command line option and `initial-frame-alist' which is superfluous
+ after the last change to `w32_createwindow'.
+
+2006-11-04 Slawomir Nowaczyk <slawek@cs.lth.se> (tiny change)
+
+ * w32proc.c (sys_wait): Only wait for processes with fd<0.
+ Others should be handled by sys_select instead. Fixes problems
+ with (progn (start-process "" nil "ls") (call-process "ls")).
+
+2006-11-04 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change)
+
+ * xmenu.c (Fmenu_bar_open): Declare variable before BLOCK_INPUT to
+ avoid gcc 2.95 error.
+
+2006-11-04 Chong Yidong <cyd@stupidchicken.com>
+
+ * gtkutil.c (update_frame_tool_bar): If icon image is invalid and
+ wicon is null, insert an empty button.
+
+2006-11-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
+
+ * xterm.c (x_raise_frame): Send _NET_ACTIVE_WINDOW when raising the
+ window.
+
+2006-11-02 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacs.c (Fkill_emacs): Fix typo in docstring.
+
+2006-11-02 Nozomu Ando <nand@mac.com>
+
+ * unexmacosx.c (mach_header, segment_command, vm_region, section)
+ [_LP64]: New defines.
+ (VM_REGION_BASIC_INFO_COUNT, VM_REGION_BASIC_INFO, LC_SEGMENT)
+ (MH_MAGIC) [_LP64]: Redefine.
+ (delta): Remove variable.
+ (curr_file_offset, pagesize): New variables.
+ (ROUNDUP_TO_PAGE_BOUNDARY): New macro.
+ (data_segment_old_fileoff): Initialize explicitly.
+ (print_region, unexec_regions_recorder, print_load_command_name)
+ (copy_segment, copy_data_segment): Use long format in printf.
+ (MAX_UNEXEC_REGIONS): Increase to 400.
+ (unexec_regions_recorder): Don't warn too many regions here.
+ (find_emacs_zone_regions): Warn too many regions here.
+ (print_load_command_name) [_LP64]: Show correct load command name.
+ (copy_segment, copy_data_segment): Use variable `curr_file_offset'.
+ Show starting virtual memory address. Don't show ending file offset.
+ (copy_symtab, copy_dysymtab, copy_twolevelhints): New argument DELTA.
+ (dump_it): Use new local variable `linkedit_delta' and pass to them.
+ Error if trying to handle multiple DATA segments.
+ (unexec): Initialize variable `pagesize'.
+
+2006-11-01 Juanma Barranquero <lekktu@gmail.com>
+
+ * eval.c (Fcatch): Doc fix.
+
+2006-10-31 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * image.c [MAC_OS] (image_load_qt_1, xpm_scan, xpm_make_color_table_v)
+ (xpm_put_color_table_v, xpm_get_color_table_v, xpm_make_color_table_h)
+ (xpm_put_color_table_h, xpm_get_color_table_h, xpm_str_to_color_key)
+ (xpm_load_image): Add const qualifier to arguments.
+ [MAC_OS] (xpm_color_key_strings): Make static const.
+
+ * mac.c (create_apple_event_from_event_ref)
+ (create_apple_event_from_drag_ref, skip_white_space, parse_comment)
+ (parse_include_file, parse_binding, parse_component)
+ (parse_resource_name, parse_value, parse_resource_line)
+ (xrm_merge_string_database, xrm_get_resource)
+ (xrm_get_preference_database): Add const qualifier to arguments.
+ [MAC_OSX] (sys_select): Make variable `context' static const.
+
+ * macfns.c (mac_color_map): Make static const.
+ (mac_color_map_lookup): Add const qualifier to arguments.
+
+ * macmenu.c (install_menu_quit_handler): Make variable `typesList'
+ static const.
+ (name_is_separator): Add const qualifier to arguments.
+
+ * macselect.c (init_service_handler): Make variable `specs' static
+ const.
+
+ * macterm.c (mac_create_bitmap_from_bitmap_data): Make variable
+ `swap_nibbles' static const.
+ (atsu_get_text_layout_with_text_ptr): Make variables `lengths',
+ `tags', `sizes', `values' static const.
+ (mac_draw_string_common): Make variables `context' static.
+ Make variables `tags', `sizes', and `values' static const.
+ (pcm_get_status, x_detect_focus_change, x_scroll_bar_handle_click)
+ (xlfdpat_create, xlfdpat_block_match_1, xlfdpat_match)
+ (mac_to_x_fontname, parse_x_font_name, add_mac_font_name)
+ (mac_do_list_fonts, is_fully_specified_xlfd, do_grow_window)
+ (mac_store_event_ref_as_apple_event, mac_make_rdb): Add const
+ qualifier to arguments.
+ (xlfd_scalable_fields, keycode_to_xkeysym_table)
+ (fn_keycode_to_keycode_table): Make static const.
+ (mac_load_query_font): Make variables `tags', `sizes', `values',
+ `types', and `selectors' static const.
+ (mac_handle_command_event, mac_handle_window_event):
+ Make variables `names' and `types' static const.
+ (init_command_handler, install_window_handler): Make variables
+ `specs*' static const.
+ (mac_handle_font_event, mac_handle_text_input_event)
+ (mac_store_service_event): Make variables `names' and `types'
+ const. Make variables `names_*' and `types_*' static const.
+
+ * macterm.h (create_apple_event_from_event_ref)
+ (create_apple_event_from_drag_ref, xrm_merge_string_database)
+ (xrm_get_resource, xrm_get_preference_database): Add const
+ qualifier to arguments in externs.
+
+2006-10-31 Kenichi Handa <handa@m17n.org>
+
+ * xfns.c (xic_create_xfontset): Fix previous change.
+
+2006-10-30 Chong Yidong <cyd@stupidchicken.com>
+
+ * s/openbsd.h (LD_SWITCH_SYSTEM): Add /usr/pkg/lib and
+ /usr/pkg/lib to library search path.
+
+2006-10-29 Mark Davies <mark@mcs.vuw.ac.nz> (tiny change)
* ralloc.c (relinquish): Use a long for excess space counter to
handle 64-bit case correctly.
@@ -69,7 +471,7 @@
2006-10-16 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* gtkutil.c (get_utf8_string): Remove warnings with casts.
- (xg_tool_bar_button_cb): Ditto
+ (xg_tool_bar_button_cb): Ditto.
(xg_tool_bar_callback): Ditto.
2006-10-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
@@ -532,7 +934,7 @@
* editfns.c (Fsystem_name): Mention "host" in the doc string.
(syms_of_editfns) <system-name>: Likewise.
-2006-08-27 Martin Rudalics <rudalics@gmx.at>
+2006-09-08 Martin Rudalics <rudalics@gmx.at>
* xdisp.c (mouse_autoselect_window): Remove.
(Vmouse_autoselect_window): New variable. DEFVAR_LISP it.
@@ -10932,7 +11334,7 @@
precedence.
(XTread_socket) [TARGET_API_MAC_CARBON]: Don't specify drag area.
-2004-10-05 Jan Dj,Ad(Brv. <jan.h.d@swipnet.se>
+2004-10-05 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* config.in: Regenerate.
@@ -15311,7 +15713,7 @@
Set BUF_INTERVALS (buffer)->up_obj when appropriate.
Handle over_used when splitting UNDER.
-2003-09-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+2003-09-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* regex.c (regex_compile): Free the stack when returning from function.
@@ -19549,7 +19951,7 @@
* alloca.c: Undo ifdef change accidentally made on 12-04.
-2002-12-06 Francesco Potorti` <pot@gnu.org>
+2002-12-06 Francesco Potort,Al(B <pot@gnu.org>
* xfns.c (png_load): Avoid double gamma correction for PNG images.
@@ -19870,7 +20272,7 @@
* fns.c (Fcopy_sequence): Doc fix.
(Fmap_char_table): Cast `call2'.
-2002-11-14 Francesco Potorti` <pot@gnu.org>
+2002-11-14 Francesco Potort,Al(B <pot@gnu.org>
* s/sol2-8.h: New file.
@@ -26188,6 +26590,7 @@ See ChangeLog.9 for earlier changes.
;; Local Variables:
;; coding: iso-2022-7bit
+;; add-log-time-zone-rule: t
;; End:
Copyright (C) 2001, 2002, 2003, 2004, 2005,
diff --git a/src/alloc.c b/src/alloc.c
index 2f186fd3d12..c49d3b5becc 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -480,7 +480,7 @@ static int live_symbol_p P_ ((struct mem_node *, void *));
static int live_float_p P_ ((struct mem_node *, void *));
static int live_misc_p P_ ((struct mem_node *, void *));
static void mark_maybe_object P_ ((Lisp_Object));
-static void mark_memory P_ ((void *, void *));
+static void mark_memory P_ ((void *, void *, int));
static void mem_init P_ ((void));
static struct mem_node *mem_insert P_ ((void *, void *, enum mem_type));
static void mem_insert_fixup P_ ((struct mem_node *));
@@ -4330,11 +4330,13 @@ mark_maybe_pointer (p)
}
-/* Mark Lisp objects referenced from the address range START..END. */
+/* Mark Lisp objects referenced from the address range START+OFFSET..END
+ or END+OFFSET..START. */
static void
-mark_memory (start, end)
+mark_memory (start, end, offset)
void *start, *end;
+ int offset;
{
Lisp_Object *p;
void **pp;
@@ -4353,7 +4355,7 @@ mark_memory (start, end)
}
/* Mark Lisp_Objects. */
- for (p = (Lisp_Object *) start; (void *) p < end; ++p)
+ for (p = (Lisp_Object *) ((char *) start + offset); (void *) p < end; ++p)
mark_maybe_object (*p);
/* Mark Lisp data pointed to. This is necessary because, in some
@@ -4374,7 +4376,7 @@ mark_memory (start, end)
away. The only reference to the life string is through the
pointer `s'. */
- for (pp = (void **) start; (void *) pp < end; ++pp)
+ for (pp = (void **) ((char *) start + offset); (void *) pp < end; ++pp)
mark_maybe_pointer (*pp);
}
@@ -4553,7 +4555,11 @@ static void
mark_stack ()
{
int i;
- jmp_buf j;
+ /* jmp_buf may not be aligned enough on darwin-ppc64 */
+ union aligned_jmpbuf {
+ Lisp_Object o;
+ jmp_buf j;
+ } j;
volatile int stack_grows_down_p = (char *) &j > (char *) stack_base;
void *end;
@@ -4584,7 +4590,7 @@ mark_stack ()
}
#endif /* GC_SETJMP_WORKS */
- setjmp (j);
+ setjmp (j.j);
end = stack_grows_down_p ? (char *) &j + sizeof j : (char *) &j;
#endif /* not GC_SAVE_REGISTERS_ON_STACK */
@@ -4599,7 +4605,7 @@ mark_stack ()
#endif
#endif
for (i = 0; i < sizeof (Lisp_Object); i += GC_LISP_OBJECT_ALIGNMENT)
- mark_memory ((char *) stack_base + i, end);
+ mark_memory (stack_base, end, i);
/* Allow for marking a secondary stack, like the register stack on the
ia64. */
#ifdef GC_MARK_SECONDARY_STACK
diff --git a/src/buffer.c b/src/buffer.c
index f2f15a54743..05555913c59 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -5948,8 +5948,8 @@ An entry of the form POSITION indicates that point was at the buffer
location given by the integer. Undoing an entry of this form places
point at POSITION.
-nil marks undo boundaries. The undo command treats the changes
-between two undo boundaries as a single step to be undone.
+Entries with value `nil' mark undo boundaries. The undo command treats
+the changes between two undo boundaries as a single step to be undone.
If the value of the variable is t, undo information is not recorded. */);
diff --git a/src/bytecode.c b/src/bytecode.c
index 2facaa47062..f96535354a4 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -597,7 +597,7 @@ If the third argument is incorrect, Emacs may crash. */)
if (SYMBOLP (sym)
&& !EQ (val, Qunbound)
&& !XSYMBOL (sym)->indirect_variable
- && !XSYMBOL (sym)->constant
+ && !SYMBOL_CONSTANT_P (sym)
&& !MISCP (XSYMBOL (sym)->value))
XSYMBOL (sym)->value = val;
else
diff --git a/src/category.c b/src/category.c
index 6835d00d824..d7178055b27 100644
--- a/src/category.c
+++ b/src/category.c
@@ -284,7 +284,8 @@ Return TABLE. */)
DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0,
- doc: /* Return the category set of CHAR. */)
+ doc: /* Return the category set of CHAR.
+usage: (char-category-set CHAR) */)
(ch)
Lisp_Object ch;
{
diff --git a/src/coding.c b/src/coding.c
index 24c6ef0b6b1..53661fc33cc 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -5577,6 +5577,8 @@ code_convert_region (from, from_byte, to, to_byte, coding, encodep, replace)
inhibit_modification_hooks = saved_inhibit_modification_hooks;
}
+ coding->heading_ascii = 0;
+
if (! encodep && CODING_REQUIRE_DETECTION (coding))
{
/* We must detect encoding of text and eol format. */
@@ -6221,6 +6223,8 @@ decode_coding_string (str, coding, nocopy)
saved_coding_symbol = coding->symbol;
coding->src_multibyte = STRING_MULTIBYTE (str);
coding->dst_multibyte = 1;
+ coding->heading_ascii = 0;
+
if (CODING_REQUIRE_DETECTION (coding))
{
/* See the comments in code_convert_region. */
@@ -6433,6 +6437,7 @@ encode_coding_string (str, coding, nocopy)
/* Try to skip the heading and tailing ASCIIs. We can't skip them
if we must run CCL program or there are compositions to
encode. */
+ coding->heading_ascii = 0;
if (coding->type != coding_type_ccl
&& (! coding->cmp_data || coding->cmp_data->used == 0))
{
@@ -7270,7 +7275,7 @@ Return the corresponding character. */)
}
DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0,
- doc: /* Encode a Japanese character CHAR to shift_jis encoding.
+ doc: /* Encode a Japanese character CH to shift_jis encoding.
Return the corresponding code in SJIS. */)
(ch)
Lisp_Object ch;
@@ -7330,7 +7335,7 @@ Return the corresponding character. */)
}
DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0,
- doc: /* Encode the Big5 character CHAR to BIG5 coding system.
+ doc: /* Encode the Big5 character CH to BIG5 coding system.
Return the corresponding character code in Big5. */)
(ch)
Lisp_Object ch;
diff --git a/src/config.in b/src/config.in
index 51f4aaa07fa..21052474ec6 100644
--- a/src/config.in
+++ b/src/config.in
@@ -99,9 +99,6 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the `bzero' function. */
#undef HAVE_BZERO
-/* Define to 1 if CancelMenuTracking is available (Mac OSX). */
-#undef HAVE_CANCELMENUTRACKING
-
/* Define to 1 if you are using the Carbon API on Mac OS X. */
#undef HAVE_CARBON
@@ -697,6 +694,9 @@ Boston, MA 02110-1301, USA. */
/* Define to 1 if you have the X11R6 or newer version of Xt. */
#undef HAVE_X11XTR6
+/* Define to 1 if the file /usr/lib64 exists. */
+#undef HAVE_X86_64_LIB64_DIR
+
/* Define to 1 if you have the Xaw3d library (-lXaw3d). */
#undef HAVE_XAW3D
diff --git a/src/data.c b/src/data.c
index cc15431cd16..cc0f96793ca 100644
--- a/src/data.c
+++ b/src/data.c
@@ -607,7 +607,7 @@ Return SYMBOL. */)
register Lisp_Object symbol;
{
CHECK_SYMBOL (symbol);
- if (XSYMBOL (symbol)->constant)
+ if (SYMBOL_CONSTANT_P (symbol))
xsignal1 (Qsetting_constant, symbol);
Fset (symbol, Qunbound);
return symbol;
@@ -2884,7 +2884,7 @@ usage: (logior &rest INTS-OR-MARKERS) */)
DEFUN ("logxor", Flogxor, Slogxor, 0, MANY, 0,
doc: /* Return bitwise-exclusive-or of all the arguments.
Arguments may be integers, or markers converted to integers.
-usage: (logxor &rest INTS-OR-MARKERS) */)
+usage: (logxor &rest INTS-OR-MARKERS) */)
(nargs, args)
int nargs;
Lisp_Object *args;
diff --git a/src/dosfns.c b/src/dosfns.c
index 22aaa62f0d1..92b90e530da 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -213,7 +213,7 @@ DEFUN ("msdos-mouse-disable", Fmsdos_mouse_disable, Smsdos_mouse_disable, 0, 0,
}
DEFUN ("insert-startup-screen", Finsert_startup_screen, Sinsert_startup_screen, 0, 0, "",
- doc: /* Insert copy of screen contents prior to starting emacs.
+ doc: /* Insert copy of screen contents prior to starting Emacs.
Return nil if startup screen is not available. */)
()
{
diff --git a/src/editfns.c b/src/editfns.c
index 71b518acb74..39f8f87c673 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3171,9 +3171,10 @@ static char *message_text;
static int message_length;
DEFUN ("message", Fmessage, Smessage, 1, MANY, 0,
- doc: /* Print a one-line message at the bottom of the screen.
+ doc: /* Display a message at the bottom of the screen.
The message also goes into the `*Messages*' buffer.
\(In keyboard macros, that's all it does.)
+Return the message.
The first argument is a format control string, and the rest are data
to be formatted under control of the string. See `format' for details.
diff --git a/src/emacs.c b/src/emacs.c
index 26a0c4da859..76ad59c78d1 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2055,7 +2055,7 @@ sort_args (argc, argv)
DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 1, "P",
doc: /* Exit the Emacs job and kill it.
If ARG is an integer, return ARG as the exit program code.
-If ARG is a string, stuff it as keyboard input.
+If ARG is a string, stuff it as keyboard input.
The value of `kill-emacs-hook', if not void,
is a list of functions (of no args),
diff --git a/src/eval.c b/src/eval.c
index 3c9a0c03214..c587142762e 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1174,7 +1174,7 @@ DEFUN ("catch", Fcatch, Scatch, 1, UNEVALLED, 0,
TAG is evalled to get the tag to use; it must not be nil.
Then the BODY is executed.
-Within BODY, (throw TAG) with same tag exits BODY and exits this `catch'.
+Within BODY, a call to `throw' with the same TAG exits BODY and this `catch'.
If no throw happens, `catch' returns the value of the last BODY form.
If a throw happens, it specifies the value to return from `catch'.
usage: (catch TAG BODY...) */)
diff --git a/src/fileio.c b/src/fileio.c
index 62d539dcfca..e6a4314e543 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1250,9 +1250,9 @@ See also the function `substitute-in-file-name'. */)
}
else
#endif /* NO_HYPHENS_IN_FILENAMES */
- if (lbrack > rbrack &&
- ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>')))
+ if (lbrack > rbrack
+ && ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<')
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>')))
lose = 1;
#ifdef NO_HYPHENS_IN_FILENAMES
else
@@ -1621,8 +1621,8 @@ See also the function `substitute-in-file-name'. */)
else if (*p == '-' && *o != '.')
*--p = '.';
}
- else if (p[0] == '-' && o[-1] == '.' &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>'))
+ else if (p[0] == '-' && o[-1] == '.'
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>'))
/* flush .foo.- ; leave - if stopped by '[' or '<' */
{
do
@@ -1637,9 +1637,9 @@ See also the function `substitute-in-file-name'. */)
else
{
#ifdef NO_HYPHENS_IN_FILENAMES
- if (*p == '-' &&
- o[-1] != '[' && o[-1] != '<' && o[-1] != '.' &&
- p[1] != ']' && p[1] != '>' && p[1] != '.')
+ if (*p == '-'
+ && o[-1] != '[' && o[-1] != '<' && o[-1] != '.'
+ && p[1] != ']' && p[1] != '>' && p[1] != '.')
*p = '_';
#endif /* NO_HYPHENS_IN_FILENAMES */
*o++ = *p++;
@@ -1822,9 +1822,9 @@ See also the function `substitute-in-file-name'.")
}
else
#endif /* VMS4_4 */
- if (lbrack > rbrack &&
- ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<') &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>')))
+ if (lbrack > rbrack
+ && ((p[-1] == '.' || p[-1] == '[' || p[-1] == '<')
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>')))
lose = 1;
#ifndef VMS4_4
else
@@ -1993,8 +1993,8 @@ See also the function `substitute-in-file-name'.")
else if (*p == '-' && *o != '.')
*--p = '.';
}
- else if (p[0] == '-' && o[-1] == '.' &&
- (p[1] == '.' || p[1] == ']' || p[1] == '>'))
+ else if (p[0] == '-' && o[-1] == '.'
+ && (p[1] == '.' || p[1] == ']' || p[1] == '>'))
/* flush .foo.- ; leave - if stopped by '[' or '<' */
{
do
@@ -2009,9 +2009,9 @@ See also the function `substitute-in-file-name'.")
else
{
#ifndef VMS4_4
- if (*p == '-' &&
- o[-1] != '[' && o[-1] != '<' && o[-1] != '.' &&
- p[1] != ']' && p[1] != '>' && p[1] != '.')
+ if (*p == '-'
+ && o[-1] != '[' && o[-1] != '<' && o[-1] != '.'
+ && p[1] != ']' && p[1] != '>' && p[1] != '.')
*p = '_';
#endif /* VMS4_4 */
*o++ = *p++;
@@ -2031,8 +2031,8 @@ See also the function `substitute-in-file-name'.")
o = target;
p++;
}
- else if (p[0] == '/' && p[1] == '.' &&
- (p[2] == '/' || p[2] == 0))
+ else if (p[0] == '/' && p[1] == '.'
+ && (p[2] == '/' || p[2] == 0))
p += 2;
else if (!strncmp (p, "/..", 3)
/* `/../' is the "superroot" on certain file systems. */
@@ -6203,9 +6203,9 @@ DEFUN ("read-file-name-internal", Fread_file_name_internal, Sread_file_name_inte
{
Lisp_Object tem = XCAR (all);
int len;
- if (STRINGP (tem) &&
- (len = SCHARS (tem), len > 0) &&
- IS_DIRECTORY_SEP (SREF (tem, len-1)))
+ if (STRINGP (tem)
+ && (len = SBYTES (tem), len > 0)
+ && IS_DIRECTORY_SEP (SREF (tem, len-1)))
comp = Fcons (tem, comp);
}
}
diff --git a/src/fns.c b/src/fns.c
index 31774e71787..709b58882ef 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -103,7 +103,7 @@ DEFUN ("random", Frandom, Srandom, 0, 1, 0,
All integers representable in Lisp are equally likely.
On most systems, this is 29 bits' worth.
With positive integer argument N, return random number in interval [0,N).
-With argument t, set the random number seed from the current time and pid. */)
+With argument t, set the random number seed from the current time and pid. */)
(n)
Lisp_Object n;
{
@@ -140,7 +140,7 @@ DEFUN ("length", Flength, Slength, 1, 1, 0,
A byte-code function object is also allowed.
If the string contains multibyte characters, this is not necessarily
the number of bytes in the string; it is the number of characters.
-To get the number of bytes, use `string-bytes'. */)
+To get the number of bytes, use `string-bytes'. */)
(sequence)
register Lisp_Object sequence;
{
@@ -150,7 +150,7 @@ To get the number of bytes, use `string-bytes'. */)
if (STRINGP (sequence))
XSETFASTINT (val, SCHARS (sequence));
else if (VECTORP (sequence))
- XSETFASTINT (val, XVECTOR (sequence)->size);
+ XSETFASTINT (val, ASIZE (sequence));
else if (SUB_CHAR_TABLE_P (sequence))
XSETFASTINT (val, SUB_CHAR_TABLE_ORDINARY_SLOTS);
else if (CHAR_TABLE_P (sequence))
@@ -158,7 +158,7 @@ To get the number of bytes, use `string-bytes'. */)
else if (BOOL_VECTOR_P (sequence))
XSETFASTINT (val, XBOOL_VECTOR (sequence)->size);
else if (COMPILEDP (sequence))
- XSETFASTINT (val, XVECTOR (sequence)->size & PSEUDOVECTOR_SIZE_MASK);
+ XSETFASTINT (val, ASIZE (sequence) & PSEUDOVECTOR_SIZE_MASK);
else if (CONSP (sequence))
{
i = 0;
@@ -193,7 +193,7 @@ DEFUN ("safe-length", Fsafe_length, Ssafe_length, 1, 1, 0,
doc: /* Return the length of a list, but avoid error or infinite loop.
This function never gets an error. If LIST is not really a list,
it returns 0. If LIST is circular, it returns a finite value
-which is at least the number of distinct elements. */)
+which is at least the number of distinct elements. */)
(list)
Lisp_Object list;
{
@@ -217,7 +217,7 @@ which is at least the number of distinct elements. */)
DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0,
doc: /* Return the number of bytes in STRING.
-If STRING is a multibyte string, this is greater than the length of STRING. */)
+If STRING is a multibyte string, this is greater than the length of STRING. */)
(string)
Lisp_Object string;
{
@@ -228,7 +228,7 @@ If STRING is a multibyte string, this is greater than the length of STRING. */)
DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0,
doc: /* Return t if two strings have identical contents.
Case is significant, but text properties are ignored.
-Symbols are also allowed; their print names are used instead. */)
+Symbols are also allowed; their print names are used instead. */)
(s1, s2)
register Lisp_Object s1, s2;
{
@@ -260,7 +260,7 @@ The value is t if the strings (or specified portions) match.
If string STR1 is less, the value is a negative number N;
- 1 - N is the number of characters that match at the beginning.
If string STR1 is greater, the value is a positive number N;
- N - 1 is the number of characters that match at the beginning. */)
+ N - 1 is the number of characters that match at the beginning. */)
(str1, start1, end1, str2, start2, end2, ignore_case)
Lisp_Object str1, start1, end1, start2, str2, end2, ignore_case;
{
@@ -352,7 +352,7 @@ If string STR1 is greater, the value is a positive number N;
DEFUN ("string-lessp", Fstring_lessp, Sstring_lessp, 2, 2, 0,
doc: /* Return t if first arg string is less than second in lexicographic order.
Case is significant.
-Symbols are also allowed; their print names are used instead. */)
+Symbols are also allowed; their print names are used instead. */)
(s1, s2)
register Lisp_Object s1, s2;
{
@@ -391,7 +391,9 @@ Symbols are also allowed; their print names are used instead. */)
/* "gcc -O3" enables automatic function inlining, which optimizes out
the arguments for the invocations of this function, whereas it
expects these values on the stack. */
-static Lisp_Object concat () __attribute__((noinline));
+static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special)) __attribute__((noinline));
+#else /* !__GNUC__ */
+static Lisp_Object concat P_ ((int nargs, Lisp_Object *args, enum Lisp_Type target_type, int last_special));
#endif
/* ARGSUSED */
@@ -488,7 +490,7 @@ copy_sub_char_table (arg)
DEFUN ("copy-sequence", Fcopy_sequence, Scopy_sequence, 1, 1, 0,
doc: /* Return a copy of a list, vector, string or char-table.
The elements of a list or vector are not copied; they are shared
-with the original. */)
+with the original. */)
(arg)
Lisp_Object arg;
{
@@ -615,7 +617,7 @@ concat (nargs, args, target_type, last_special)
if (VECTORP (this))
for (i = 0; i < len; i++)
{
- ch = XVECTOR (this)->contents[i];
+ ch = AREF (this, i);
CHECK_NUMBER (ch);
this_len_byte = CHAR_BYTES (XINT (ch));
result_len_byte += this_len_byte;
@@ -768,7 +770,7 @@ concat (nargs, args, target_type, last_special)
thisindex++;
}
else
- elt = XVECTOR (this)->contents[thisindex++];
+ elt = AREF (this, thisindex++);
/* Store this element into the result. */
if (toindex < 0)
@@ -778,7 +780,7 @@ concat (nargs, args, target_type, last_special)
tail = XCDR (tail);
}
else if (VECTORP (val))
- XVECTOR (val)->contents[toindex++] = elt;
+ AREF (val, toindex++) = elt;
else
{
CHECK_NUMBER (elt);
@@ -1109,7 +1111,7 @@ DEFUN ("string-make-unibyte", Fstring_make_unibyte, Sstring_make_unibyte,
Multibyte character codes are converted to unibyte according to
`nonascii-translation-table' or, if that is nil, `nonascii-insert-offset'.
If the lookup in the translation table fails, this function takes just
-the low 8 bits of each character. */)
+the low 8 bits of each character. */)
(string)
Lisp_Object string;
{
@@ -1259,7 +1261,7 @@ This function allows vectors as well as strings. */)
size_byte = SBYTES (string);
}
else
- size = XVECTOR (string)->size;
+ size = ASIZE (string);
if (NILP (to))
{
@@ -1297,8 +1299,7 @@ This function allows vectors as well as strings. */)
string, make_number (0), res, Qnil);
}
else
- res = Fvector (to_char - from_char,
- XVECTOR (string)->contents + from_char);
+ res = Fvector (to_char - from_char, &AREF (string, from_char));
return res;
}
@@ -1382,7 +1383,7 @@ substring_both (string, from, from_byte, to, to_byte)
size_byte = SBYTES (string);
}
else
- size = XVECTOR (string)->size;
+ size = ASIZE (string);
if (!(0 <= from && from <= to && to <= size))
args_out_of_range_3 (string, make_number (from), make_number (to));
@@ -1396,8 +1397,7 @@ substring_both (string, from, from_byte, to, to_byte)
string, make_number (0), res, Qnil);
}
else
- res = Fvector (to - from,
- XVECTOR (string)->contents + from);
+ res = Fvector (to - from, &AREF (string, from));
return res;
}
@@ -2243,11 +2243,11 @@ internal_equal (o1, o2, depth, props)
case Lisp_Vectorlike:
{
register int i;
- EMACS_INT size = XVECTOR (o1)->size;
+ EMACS_INT size = ASIZE (o1);
/* Pseudovectors have the type encoded in the size field, so this test
actually checks that the objects have the same type as well as the
same size. */
- if (XVECTOR (o2)->size != size)
+ if (ASIZE (o2) != size)
return 0;
/* Boolvectors are compared much like strings. */
if (BOOL_VECTOR_P (o1))
@@ -2277,8 +2277,8 @@ internal_equal (o1, o2, depth, props)
for (i = 0; i < size; i++)
{
Lisp_Object v1, v2;
- v1 = XVECTOR (o1)->contents [i];
- v2 = XVECTOR (o2)->contents [i];
+ v1 = AREF (o1, i);
+ v2 = AREF (o2, i);
if (!internal_equal (v1, v2, depth + 1, props))
return 0;
}
@@ -2319,7 +2319,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
if (VECTORP (array))
{
register Lisp_Object *p = XVECTOR (array)->contents;
- size = XVECTOR (array)->size;
+ size = ASIZE (array);
for (index = 0; index < size; index++)
p[index] = item;
}
@@ -2547,7 +2547,7 @@ Note that this function doesn't check the parent of CHAR-TABLE. */)
charset_info = Fget (range, Qcharset);
CHECK_VECTOR (charset_info);
- charset_id = XINT (XVECTOR (charset_info)->contents[0]);
+ charset_id = XINT (AREF (charset_info, 0));
ch = Fmake_char_internal (make_number (charset_id),
make_number (0), make_number (0));
}
@@ -2673,7 +2673,7 @@ character set, or a character code. Return VALUE. */)
Faset (char_table, range, value);
else if (VECTORP (range))
{
- int size = XVECTOR (range)->size;
+ int size = ASIZE (range);
Lisp_Object *val = XVECTOR (range)->contents;
Lisp_Object ch = Fmake_char_internal (size <= 0 ? Qnil : val[0],
size <= 1 ? Qnil : val[1],
@@ -3059,14 +3059,14 @@ mapcar1 (leni, vals, fn, seq)
else
GCPRO2 (fn, seq);
/* We need not explicitly protect `tail' because it is used only on lists, and
- 1) lists are not relocated and 2) the list is marked via `seq' so will not be freed */
+ 1) lists are not relocated and 2) the list is marked via `seq' so will not
+ be freed */
if (VECTORP (seq))
{
for (i = 0; i < leni; i++)
{
- dummy = XVECTOR (seq)->contents[i];
- dummy = call1 (fn, dummy);
+ dummy = call1 (fn, AREF (seq, i));
if (vals)
vals[i] = dummy;
}
@@ -3077,11 +3077,7 @@ mapcar1 (leni, vals, fn, seq)
{
int byte;
byte = XBOOL_VECTOR (seq)->data[i / BOOL_VECTOR_BITS_PER_CHAR];
- if (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR)))
- dummy = Qt;
- else
- dummy = Qnil;
-
+ dummy = (byte & (1 << (i % BOOL_VECTOR_BITS_PER_CHAR))) ? Qt : Qnil;
dummy = call1 (fn, dummy);
if (vals)
vals[i] = dummy;
@@ -3464,7 +3460,7 @@ DEFUN ("featurep", Ffeaturep, Sfeaturep, 1, 2, 0,
doc: /* Returns t if FEATURE is present in this Emacs.
Use this to conditionalize execution of lisp code based on the
-presence or absence of emacs or environment extensions.
+presence or absence of Emacs or environment extensions.
Use `provide' to declare that a feature is available. This function
looks at the value of the variable `features'. The optional argument
SUBFEATURE can be used to check a specific subfeature of FEATURE. */)
@@ -4385,7 +4381,7 @@ larger_vector (vec, new_size, init)
int i, old_size;
xassert (VECTORP (vec));
- old_size = XVECTOR (vec)->size;
+ old_size = ASIZE (vec);
xassert (new_size >= old_size);
v = allocate_vector (new_size);
@@ -4717,7 +4713,7 @@ maybe_resize_hash_table (h)
if (!NILP (HASH_HASH (h, i)))
{
unsigned hash_code = XUINT (HASH_HASH (h, i));
- int start_of_bucket = hash_code % XVECTOR (h->index)->size;
+ int start_of_bucket = hash_code % ASIZE (h->index);
HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket);
HASH_INDEX (h, start_of_bucket) = make_number (i);
}
@@ -4743,7 +4739,7 @@ hash_lookup (h, key, hash)
if (hash)
*hash = hash_code;
- start_of_bucket = hash_code % XVECTOR (h->index)->size;
+ start_of_bucket = hash_code % ASIZE (h->index);
idx = HASH_INDEX (h, start_of_bucket);
/* We need not gcpro idx since it's either an integer or nil. */
@@ -4790,7 +4786,7 @@ hash_put (h, key, value, hash)
HASH_HASH (h, i) = make_number (hash);
/* Add new entry to its collision chain. */
- start_of_bucket = hash % XVECTOR (h->index)->size;
+ start_of_bucket = hash % ASIZE (h->index);
HASH_NEXT (h, i) = HASH_INDEX (h, start_of_bucket);
HASH_INDEX (h, start_of_bucket) = make_number (i);
return i;
@@ -4809,7 +4805,7 @@ hash_remove (h, key)
Lisp_Object idx, prev;
hash_code = h->hashfn (h, key);
- start_of_bucket = hash_code % XVECTOR (h->index)->size;
+ start_of_bucket = hash_code % ASIZE (h->index);
idx = HASH_INDEX (h, start_of_bucket);
prev = Qnil;
@@ -4865,8 +4861,8 @@ hash_clear (h)
HASH_HASH (h, i) = Qnil;
}
- for (i = 0; i < XVECTOR (h->index)->size; ++i)
- XVECTOR (h->index)->contents[i] = Qnil;
+ for (i = 0; i < ASIZE (h->index); ++i)
+ AREF (h->index, i) = Qnil;
h->next_free = make_number (0);
h->count = make_number (0);
@@ -4891,7 +4887,7 @@ sweep_weak_table (h, remove_entries_p)
{
int bucket, n, marked;
- n = XVECTOR (h->index)->size & ~ARRAY_MARK_FLAG;
+ n = ASIZE (h->index) & ~ARRAY_MARK_FLAG;
marked = 0;
for (bucket = 0; bucket < n; ++bucket)
@@ -5105,13 +5101,13 @@ sxhash_vector (vec, depth)
Lisp_Object vec;
int depth;
{
- unsigned hash = XVECTOR (vec)->size;
+ unsigned hash = ASIZE (vec);
int i, n;
- n = min (SXHASH_MAX_LEN, XVECTOR (vec)->size);
+ n = min (SXHASH_MAX_LEN, ASIZE (vec));
for (i = 0; i < n; ++i)
{
- unsigned hash2 = sxhash (XVECTOR (vec)->contents[i], depth + 1);
+ unsigned hash2 = sxhash (AREF (vec, i), depth + 1);
hash = SXHASH_COMBINE (hash, hash2);
}
@@ -5806,7 +5802,7 @@ syms_of_fns ()
Fset (Qyes_or_no_p_history, Qnil);
DEFVAR_LISP ("features", &Vfeatures,
- doc: /* A list of symbols which are the features of the executing emacs.
+ doc: /* A list of symbols which are the features of the executing Emacs.
Used by `featurep' and `require', and altered by `provide'. */);
Vfeatures = Fcons (intern ("emacs"), Qnil);
Qsubfeatures = intern ("subfeatures");
diff --git a/src/frame.c b/src/frame.c
index d7c58fd8faa..b6f361bcbfe 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -2905,7 +2905,7 @@ extern Lisp_Object Qbox;
extern Lisp_Object Qtop;
/* Calculate fullscreen size. Return in *TOP_POS and *LEFT_POS the
- wanted positions of the WM window (not emacs window).
+ wanted positions of the WM window (not Emacs window).
Return in *WIDTH and *HEIGHT the wanted width and height of Emacs
window (FRAME_X_WINDOW).
*/
@@ -3340,6 +3340,9 @@ x_set_fullscreen (f, new_value, old_value)
f->want_fullscreen = FULLSCREEN_WIDTH;
else if (EQ (new_value, Qfullheight))
f->want_fullscreen = FULLSCREEN_HEIGHT;
+
+ if (FRAME_TERMINAL (f)->fullscreen_hook != NULL)
+ FRAME_TERMINAL (f)->fullscreen_hook (f);
}
@@ -4429,7 +4432,7 @@ Setting this variable does not affect existing frames, only new ones. */);
doc: /* The initial frame-object, which represents Emacs's stdout. */);
DEFVAR_LISP ("emacs-iconified", &Vemacs_iconified,
- doc: /* Non-nil if all of emacs is iconified and frame updates are not needed. */);
+ doc: /* Non-nil if all of Emacs is iconified and frame updates are not needed. */);
Vemacs_iconified = Qnil;
DEFVAR_LISP ("mouse-position-function", &Vmouse_position_function,
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2370855248a..17bf2d20a4c 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3720,7 +3720,12 @@ update_frame_tool_bar (f)
if (img->load_failed_p || img->pixmap == None)
{
- if (wicon) gtk_widget_hide (wicon);
+ if (wicon)
+ gtk_widget_hide (wicon);
+ else
+ gtk_toolbar_insert (GTK_TOOLBAR (x->toolbar_widget),
+ gtk_tool_button_new (NULL, ""),
+ i);
continue;
}
diff --git a/src/image.c b/src/image.c
index 5b80fe5b692..8f13da337ff 100644
--- a/src/image.c
+++ b/src/image.c
@@ -2395,7 +2395,7 @@ image_load_qt_1 (f, img, type, fss, dh)
struct frame *f;
struct image *img;
OSType type;
- FSSpec *fss;
+ const FSSpec *fss;
Handle dh;
{
ComponentResult err;
@@ -2409,8 +2409,7 @@ image_load_qt_1 (f, img, type, fss, dh)
XImagePtr ximg;
RGBColor bg_color;
- err = OpenADefaultComponent (GraphicsImporterComponentType,
- type, &gi);
+ err = OpenADefaultComponent (GraphicsImporterComponentType, type, &gi);
if (err != noErr)
{
image_error ("Cannot get importer component for `%s'", img->spec, Qnil);
@@ -4112,25 +4111,25 @@ xpm_load (f, img)
/* XPM support functions for Mac OS where libxpm is not available.
Only XPM version 3 (without any extensions) is supported. */
-static int xpm_scan P_ ((unsigned char **, unsigned char *,
- unsigned char **, int *));
+static int xpm_scan P_ ((const unsigned char **, const unsigned char *,
+ const unsigned char **, int *));
static Lisp_Object xpm_make_color_table_v
- P_ ((void (**) (Lisp_Object, unsigned char *, int, Lisp_Object),
- Lisp_Object (**) (Lisp_Object, unsigned char *, int)));
-static void xpm_put_color_table_v P_ ((Lisp_Object, unsigned char *,
+ P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
+ Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
+static void xpm_put_color_table_v P_ ((Lisp_Object, const unsigned char *,
int, Lisp_Object));
static Lisp_Object xpm_get_color_table_v P_ ((Lisp_Object,
- unsigned char *, int));
+ const unsigned char *, int));
static Lisp_Object xpm_make_color_table_h
- P_ ((void (**) (Lisp_Object, unsigned char *, int, Lisp_Object),
- Lisp_Object (**) (Lisp_Object, unsigned char *, int)));
-static void xpm_put_color_table_h P_ ((Lisp_Object, unsigned char *,
+ P_ ((void (**) (Lisp_Object, const unsigned char *, int, Lisp_Object),
+ Lisp_Object (**) (Lisp_Object, const unsigned char *, int)));
+static void xpm_put_color_table_h P_ ((Lisp_Object, const unsigned char *,
int, Lisp_Object));
static Lisp_Object xpm_get_color_table_h P_ ((Lisp_Object,
- unsigned char *, int));
-static int xpm_str_to_color_key P_ ((char *));
+ const unsigned char *, int));
+static int xpm_str_to_color_key P_ ((const char *));
static int xpm_load_image P_ ((struct frame *, struct image *,
- unsigned char *, unsigned char *));
+ const unsigned char *, const unsigned char *));
/* Tokens returned from xpm_scan. */
@@ -4150,7 +4149,7 @@ enum xpm_token
static int
xpm_scan (s, end, beg, len)
- unsigned char **s, *end, **beg;
+ const unsigned char **s, *end, **beg;
int *len;
{
int c;
@@ -4216,8 +4215,8 @@ xpm_scan (s, end, beg, len)
static Lisp_Object
xpm_make_color_table_v (put_func, get_func)
- void (**put_func) (Lisp_Object, unsigned char *, int, Lisp_Object);
- Lisp_Object (**get_func) (Lisp_Object, unsigned char *, int);
+ void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object);
+ Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int);
{
*put_func = xpm_put_color_table_v;
*get_func = xpm_get_color_table_v;
@@ -4227,7 +4226,7 @@ xpm_make_color_table_v (put_func, get_func)
static void
xpm_put_color_table_v (color_table, chars_start, chars_len, color)
Lisp_Object color_table;
- unsigned char *chars_start;
+ const unsigned char *chars_start;
int chars_len;
Lisp_Object color;
{
@@ -4237,7 +4236,7 @@ xpm_put_color_table_v (color_table, chars_start, chars_len, color)
static Lisp_Object
xpm_get_color_table_v (color_table, chars_start, chars_len)
Lisp_Object color_table;
- unsigned char *chars_start;
+ const unsigned char *chars_start;
int chars_len;
{
return XVECTOR (color_table)->contents[*chars_start];
@@ -4245,8 +4244,8 @@ xpm_get_color_table_v (color_table, chars_start, chars_len)
static Lisp_Object
xpm_make_color_table_h (put_func, get_func)
- void (**put_func) (Lisp_Object, unsigned char *, int, Lisp_Object);
- Lisp_Object (**get_func) (Lisp_Object, unsigned char *, int);
+ void (**put_func) (Lisp_Object, const unsigned char *, int, Lisp_Object);
+ Lisp_Object (**get_func) (Lisp_Object, const unsigned char *, int);
{
*put_func = xpm_put_color_table_h;
*get_func = xpm_get_color_table_h;
@@ -4259,7 +4258,7 @@ xpm_make_color_table_h (put_func, get_func)
static void
xpm_put_color_table_h (color_table, chars_start, chars_len, color)
Lisp_Object color_table;
- unsigned char *chars_start;
+ const unsigned char *chars_start;
int chars_len;
Lisp_Object color;
{
@@ -4274,7 +4273,7 @@ xpm_put_color_table_h (color_table, chars_start, chars_len, color)
static Lisp_Object
xpm_get_color_table_h (color_table, chars_start, chars_len)
Lisp_Object color_table;
- unsigned char *chars_start;
+ const unsigned char *chars_start;
int chars_len;
{
struct Lisp_Hash_Table *table = XHASH_TABLE (color_table);
@@ -4292,11 +4291,11 @@ enum xpm_color_key {
XPM_COLOR_KEY_C
};
-static char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"};
+static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"};
static int
xpm_str_to_color_key (s)
- char *s;
+ const char *s;
{
int i;
@@ -4312,15 +4311,15 @@ static int
xpm_load_image (f, img, contents, end)
struct frame *f;
struct image *img;
- unsigned char *contents, *end;
+ const unsigned char *contents, *end;
{
- unsigned char *s = contents, *beg, *str;
+ const unsigned char *s = contents, *beg, *str;
unsigned char buffer[BUFSIZ];
int width, height, x, y;
int num_colors, chars_per_pixel;
int len, LA1;
- void (*put_color_table) (Lisp_Object, unsigned char *, int, Lisp_Object);
- Lisp_Object (*get_color_table) (Lisp_Object, unsigned char *, int);
+ void (*put_color_table) (Lisp_Object, const unsigned char *, int, Lisp_Object);
+ Lisp_Object (*get_color_table) (Lisp_Object, const unsigned char *, int);
Lisp_Object frame, color_symbols, color_table;
int best_key, have_mask = 0;
XImagePtr ximg = NULL, mask_img = NULL;
diff --git a/src/indent.c b/src/indent.c
index efe10bc3f78..e84059972f3 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2090,10 +2090,10 @@ whether or not it is currently displayed in some window. */)
it_start = IT_CHARPOS (it);
/* We expect the call to move_it_to, further down, to overshoot
- if the starting point is on an image, stretch glyph, or Lisp
- string. We won't need to backtrack in this situation, except
- for one corner case: when the Lisp string contains a
- newline. */
+ if the starting point is on an image, stretch glyph,
+ composition, or Lisp string. We won't need to backtrack in
+ this situation, except for one corner case: when the Lisp
+ string contains a newline. */
if (it.method == GET_FROM_STRING)
{
const char *s = SDATA (it.string);
@@ -2106,7 +2106,8 @@ whether or not it is currently displayed in some window. */)
}
else
it_overshoot_expected_p = (it.method == GET_FROM_IMAGE
- || it.method == GET_FROM_STRETCH);
+ || it.method == GET_FROM_STRETCH
+ || it.method == GET_FROM_COMPOSITION);
reseat_at_previous_visible_line_start (&it);
it.current_x = it.hpos = 0;
diff --git a/src/keyboard.c b/src/keyboard.c
index 97554717e9a..2f4879da110 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5816,7 +5816,7 @@ make_lispy_event (event)
position = make_lispy_position (f, &event->x, &event->y,
event->timestamp);
- /* Set double or triple modifiers to indicate the wheel speed. */
+ /* Set double or triple modifiers to indicate the wheel speed. */
{
/* On window-system frames, use the value of
double-click-fuzz as is. On other frames, interpret it
@@ -5870,7 +5870,7 @@ make_lispy_event (event)
if (event->modifiers & up_modifier)
{
- /* Emit a wheel-up event. */
+ /* Emit a wheel-up event. */
event->modifiers &= ~up_modifier;
symbol_num = 0;
}
@@ -5885,7 +5885,7 @@ make_lispy_event (event)
the up_modifier set. */
abort ();
- /* Get the symbol we should use for the wheel event. */
+ /* Get the symbol we should use for the wheel event. */
head = modify_event_symbol (symbol_num,
event->modifiers,
Qmouse_click,
diff --git a/src/lread.c b/src/lread.c
index ef76e72f75f..596ba79cb57 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -134,7 +134,7 @@ static int load_force_doc_strings;
/* Nonzero means read should convert strings to unibyte. */
static int load_convert_to_unibyte;
-/* Function to use for loading an Emacs lisp source file (not
+/* Function to use for loading an Emacs Lisp source file (not
compiled) instead of readevalloop. */
Lisp_Object Vload_source_file_function;
@@ -4119,7 +4119,7 @@ The default is nil, which means use the function `read'. */);
Vload_read_function = Qnil;
DEFVAR_LISP ("load-source-file-function", &Vload_source_file_function,
- doc: /* Function called in `load' for loading an Emacs lisp source file.
+ doc: /* Function called in `load' for loading an Emacs Lisp source file.
This function is for doing code conversion before reading the source file.
If nil, loading is done without any code conversion.
Arguments are FULLNAME, FILE, NOERROR, NOMESSAGE, where
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
index 419fa131692..940ff70dbda 100644
--- a/src/m/amdx86-64.h
+++ b/src/m/amdx86-64.h
@@ -128,7 +128,11 @@ Boston, MA 02110-1301, USA. */
#else /* !__OpenBSD__ && !__FreeBSD__ */
#undef START_FILES
+#ifdef HAVE_X86_64_LIB64_DIR
#define START_FILES pre-crt0.o /usr/lib64/crt1.o /usr/lib64/crti.o
+#else
+#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
+#endif
/* The duplicate -lgcc is intentional in the definition of LIB_STANDARD.
The reason is that some functions in libgcc.a call functions from libc.a,
@@ -136,7 +140,11 @@ Boston, MA 02110-1301, USA. */
versions of ld are one-pass linkers, we need to mention -lgcc twice,
or else we risk getting unresolved externals. */
#undef LIB_STANDARD
+#ifdef HAVE_X86_64_LIB64_DIR
#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib64/crtn.o
+#else
+#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
+#endif
#endif /* __FreeBSD__ */
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
index 3d3e45eda81..10b43bf8246 100644
--- a/src/m/ibmrs6000.h
+++ b/src/m/ibmrs6000.h
@@ -44,7 +44,7 @@ Boston, MA 02110-1301, USA. */
#define IBMR2AIX
/* Use type int rather than a union, to represent Lisp_Object */
-/* This is desirable for most machines. */
+/* This is desirable for most machines. */
#define NO_UNION_TYPE
@@ -72,7 +72,7 @@ Boston, MA 02110-1301, USA. */
/* The data segment in this machine always starts at address 0x20000000.
An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
+ we always lose the high bits. We must tell XPNTR to add them back. */
#ifndef USG5_4
#define DATA_SEG_BITS 0x20000000
@@ -86,7 +86,7 @@ Boston, MA 02110-1301, USA. */
#define PURE_SEG_BITS 0x30000000
/* Use shared memory. */
-/* This is turned off because it does not always work. See etc/AIX.DUMP. */
+/* This is turned off because it does not always work. See etc/AIX.DUMP. */
/* #define HAVE_SHM */
#define SHMKEY 5305035 /* used for shared memory code segments */
#endif /* CANNOT_DUMP */
diff --git a/src/m/pfa50.h b/src/m/pfa50.h
index 85d281073f1..0b1511fd8e7 100644
--- a/src/m/pfa50.h
+++ b/src/m/pfa50.h
@@ -50,7 +50,7 @@ Boston, MA 02110-1301, USA. */
#define NO_REMAP
/* Define TEXT_START_ADDR if your linker don't set execute point to _start.
- If it needed, temacs always CORE-DUMP. */
+ If it needed, temacs always CORE-DUMP. */
#define TEXT_START_ADDR __start
diff --git a/src/mac.c b/src/mac.c
index d127422ccde..c4275caa741 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -835,8 +835,8 @@ OSStatus
create_apple_event_from_event_ref (event, num_params, names, types, result)
EventRef event;
UInt32 num_params;
- EventParamName *names;
- EventParamType *types;
+ const EventParamName *names;
+ const EventParamType *types;
AppleEvent *result;
{
OSStatus err;
@@ -891,7 +891,7 @@ OSErr
create_apple_event_from_drag_ref (drag, num_types, types, result)
DragRef drag;
UInt32 num_types;
- FlavorType *types;
+ const FlavorType *types;
AppleEvent *result;
{
OSErr err;
@@ -1315,7 +1315,7 @@ cfproperty_list_to_lisp (plist, with_tag, hash_bound)
static void
skip_white_space (p)
- char **p;
+ const char **p;
{
/* WhiteSpace = {<space> | <horizontal tab>} */
while (*P == ' ' || *P == '\t')
@@ -1324,7 +1324,7 @@ skip_white_space (p)
static int
parse_comment (p)
- char **p;
+ const char **p;
{
/* Comment = "!" {<any character except null or newline>} */
if (*P == '!')
@@ -1342,7 +1342,7 @@ parse_comment (p)
/* Don't interpret filename. Just skip until the newline. */
static int
parse_include_file (p)
- char **p;
+ const char **p;
{
/* IncludeFile = "#" WhiteSpace "include" WhiteSpace FileName WhiteSpace */
if (*P == '#')
@@ -1359,7 +1359,7 @@ parse_include_file (p)
static char
parse_binding (p)
- char **p;
+ const char **p;
{
/* Binding = "." | "*" */
if (*P == '.' || *P == '*')
@@ -1377,7 +1377,7 @@ parse_binding (p)
static Lisp_Object
parse_component (p)
- char **p;
+ const char **p;
{
/* Component = "?" | ComponentName
ComponentName = NameChar {NameChar}
@@ -1389,7 +1389,7 @@ parse_component (p)
}
else if (isalnum (*P) || *P == '_' || *P == '-')
{
- char *start = P++;
+ const char *start = P++;
while (isalnum (*P) || *P == '_' || *P == '-')
P++;
@@ -1402,7 +1402,7 @@ parse_component (p)
static Lisp_Object
parse_resource_name (p)
- char **p;
+ const char **p;
{
Lisp_Object result = Qnil, component;
char binding;
@@ -1436,7 +1436,7 @@ parse_resource_name (p)
static Lisp_Object
parse_value (p)
- char **p;
+ const char **p;
{
char *q, *buf;
Lisp_Object seq = Qnil, result;
@@ -1526,7 +1526,7 @@ parse_value (p)
static Lisp_Object
parse_resource_line (p)
- char **p;
+ const char **p;
{
Lisp_Object quarks, value;
@@ -1629,7 +1629,7 @@ xrm_q_put_resource (database, quarks, value)
void
xrm_merge_string_database (database, data)
XrmDatabase database;
- char *data;
+ const char *data;
{
Lisp_Object quarks_value;
@@ -1705,7 +1705,7 @@ xrm_q_get_resource (database, quark_name, quark_class)
Lisp_Object
xrm_get_resource (database, name, class)
XrmDatabase database;
- char *name, *class;
+ const char *name, *class;
{
Lisp_Object key, query_cache, quark_name, quark_class, tmp;
int i, nn, nc;
@@ -1794,7 +1794,7 @@ xrm_cfproperty_list_to_value (plist)
XrmDatabase
xrm_get_preference_database (application)
- char *application;
+ const char *application;
{
#if TARGET_API_MAC_CARBON
CFStringRef app_id, *keys, user_doms[2], host_doms[2];
@@ -5129,7 +5129,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
int minfd, fd;
CFRunLoopRef runloop =
(CFRunLoopRef) GetCFRunLoopFromEventLoop (GetCurrentEventLoop ());
- static CFSocketContext context = {0, ofds, NULL, NULL, NULL};
+ static const CFSocketContext context = {0, ofds, NULL, NULL, NULL};
static CFMutableDictionaryRef sources;
if (sources == NULL)
diff --git a/src/macfns.c b/src/macfns.c
index e0e58ff5c6f..14261f67ad6 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -251,7 +251,7 @@ typedef struct colormap_t
char *name;
} colormap_t;
-colormap_t mac_color_map[] =
+static const colormap_t mac_color_map[] =
{
{ RGB_TO_ULONG(255, 250, 250), "snow" },
{ RGB_TO_ULONG(248, 248, 255), "ghost white" },
@@ -1009,7 +1009,7 @@ colormap_t mac_color_map[] =
Lisp_Object
mac_color_map_lookup (colorname)
- char *colorname;
+ const char *colorname;
{
Lisp_Object ret = Qnil;
int i;
@@ -3092,18 +3092,30 @@ If omitted or nil, that stands for the selected frame's display. */)
Lisp_Object display;
{
struct mac_display_info *dpyinfo = check_x_display_info (display);
+
/* Only of the main display. */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- CGSize size;
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CGDisplayScreenSize != NULL)
+#endif
+ {
+ CGSize size;
- BLOCK_INPUT;
- size = CGDisplayScreenSize (kCGDirectMainDisplay);
- UNBLOCK_INPUT;
+ BLOCK_INPUT;
+ size = CGDisplayScreenSize (kCGDirectMainDisplay);
+ UNBLOCK_INPUT;
- return make_number ((int) (size.height + .5f));
-#else
- /* This is an approximation. */
- return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
+ return make_number ((int) (size.height + .5f));
+ }
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ {
+ /* This is an approximation. */
+ return make_number ((int) (dpyinfo->height * 25.4 / dpyinfo->resy));
+ }
#endif
}
@@ -3116,18 +3128,30 @@ If omitted or nil, that stands for the selected frame's display. */)
Lisp_Object display;
{
struct mac_display_info *dpyinfo = check_x_display_info (display);
+
/* Only of the main display. */
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- CGSize size;
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CGDisplayScreenSize != NULL)
+#endif
+ {
+ CGSize size;
- BLOCK_INPUT;
- size = CGDisplayScreenSize (kCGDirectMainDisplay);
- UNBLOCK_INPUT;
+ BLOCK_INPUT;
+ size = CGDisplayScreenSize (kCGDirectMainDisplay);
+ UNBLOCK_INPUT;
- return make_number ((int) (size.width + .5f));
-#else
- /* This is an approximation. */
- return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
+ return make_number ((int) (size.width + .5f));
+ }
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ {
+ /* This is an approximation. */
+ return make_number ((int) (dpyinfo->width * 25.4 / dpyinfo->resx));
+ }
#endif
}
diff --git a/src/macmenu.c b/src/macmenu.c
index 1a1525eafb7..14bfe92cb25 100644
--- a/src/macmenu.c
+++ b/src/macmenu.c
@@ -319,7 +319,7 @@ restore_menu_items (saved)
menu_items_used = XINT (XCAR (saved));
saved = XCDR (saved);
menu_items_n_panes = XINT (XCAR (saved));
- saved = XCDR (saved);
+ saved = XCDR (saved);
menu_items_submenu_depth = XINT (XCAR (saved));
return Qnil;
}
@@ -1453,7 +1453,7 @@ update_submenu_strings (first_wv)
/* Event handler function that pops down a menu on C-g. We can only pop
down menus if CancelMenuTracking is present (OSX 10.3 or later). */
-#ifdef HAVE_CANCELMENUTRACKING
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
static pascal OSStatus
menu_quit_handler (nextHandler, theEvent, userData)
EventHandlerCallRef nextHandler;
@@ -1487,7 +1487,7 @@ menu_quit_handler (nextHandler, theEvent, userData)
return CallNextEventHandler (nextHandler, theEvent);
}
-#endif /* HAVE_CANCELMENUTRACKING */
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
/* Add event handler to all menus that belong to KIND so we can detect C-g.
MENU_HANDLE is the root menu of the tracking session to dismiss
@@ -1499,10 +1499,15 @@ install_menu_quit_handler (kind, menu_handle)
enum mac_menu_kind kind;
MenuHandle menu_handle;
{
-#ifdef HAVE_CANCELMENUTRACKING
- EventTypeSpec typesList[] = { { kEventClassKeyboard, kEventRawKeyDown } };
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
+ static const EventTypeSpec typesList[] =
+ {{kEventClassKeyboard, kEventRawKeyDown}};
int id;
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CancelMenuTracking == NULL)
+ return;
+#endif
for (id = min_menu_id[kind]; id < min_menu_id[kind + 1]; id++)
{
MenuHandle menu = GetMenuHandle (id);
@@ -1511,9 +1516,9 @@ install_menu_quit_handler (kind, menu_handle)
break;
InstallMenuEventHandler (menu, menu_quit_handler,
GetEventTypeCount (typesList),
- typesList, menu_handle, NULL);
+ typesList, menu_handle, NULL);
}
-#endif /* HAVE_CANCELMENUTRACKING */
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
}
/* Set the contents of the menubar widgets of frame F.
@@ -2428,9 +2433,9 @@ mac_dialog_show (f, keymaps, title, header, error_name)
/* Is this item a separator? */
static int
name_is_separator (name)
- char *name;
+ const char *name;
{
- char *start = name;
+ const char *start = name;
/* Check if name string consists of only dashes ('-'). */
while (*name == '-') name++;
@@ -2641,6 +2646,17 @@ dispose_menus (kind, id)
}
#endif /* HAVE_MENUS */
+
+/* The following is used by delayed window autoselection. */
+
+DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
+ doc: /* Return t if a menu or popup dialog is active. */)
+ ()
+{
+ /* Always return Qnil since menu selection functions do not return
+ until a selection has been made or cancelled. */
+ return Qnil;
+}
void
syms_of_macmenu ()
@@ -2652,6 +2668,7 @@ syms_of_macmenu ()
staticpro (&Qdebug_on_next_call);
defsubr (&Sx_popup_menu);
+ defsubr (&Smenu_or_popup_active_p);
#ifdef HAVE_MENUS
defsubr (&Sx_popup_dialog);
#endif
diff --git a/src/macselect.c b/src/macselect.c
index fd72bd3cb14..7a952f88367 100644
--- a/src/macselect.c
+++ b/src/macselect.c
@@ -1616,10 +1616,11 @@ remove_drag_handler (window)
void
init_service_handler ()
{
- EventTypeSpec specs[] = {{kEventClassService, kEventServiceGetTypes},
- {kEventClassService, kEventServiceCopy},
- {kEventClassService, kEventServicePaste},
- {kEventClassService, kEventServicePerform}};
+ static const EventTypeSpec specs[] =
+ {{kEventClassService, kEventServiceGetTypes},
+ {kEventClassService, kEventServiceCopy},
+ {kEventClassService, kEventServicePaste},
+ {kEventClassService, kEventServicePerform}};
InstallApplicationEventHandler (NewEventHandlerUPP (mac_handle_service_event),
GetEventTypeCount (specs), specs, NULL, NULL);
}
diff --git a/src/macterm.c b/src/macterm.c
index d4ce2a1b298..4739a52520e 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -244,7 +244,8 @@ static void x_new_focus_frame P_ ((struct x_display_info *, struct frame *));
static void mac_focus_changed P_ ((int, struct mac_display_info *,
struct frame *, struct input_event *));
static void x_detect_focus_change P_ ((struct mac_display_info *,
- EventRecord *, struct input_event *));
+ const EventRecord *,
+ struct input_event *));
static void XTframe_rehighlight P_ ((struct frame *));
static void x_frame_rehighlight P_ ((struct x_display_info *));
static void x_draw_hollow_cursor P_ ((struct window *, struct glyph_row *));
@@ -640,7 +641,7 @@ mac_create_bitmap_from_bitmap_data (bitmap, bits, w, h)
char *bits;
int w, h;
{
- static unsigned char swap_nibble[16]
+ static const unsigned char swap_nibble[16]
= { 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */
0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */
0x1, 0x9, 0x5, 0xd, /* 0001 1001 0101 1101 */
@@ -826,9 +827,9 @@ atsu_get_text_layout_with_text_ptr (text, text_length, style, text_layout)
if (saved_text_layout == NULL)
{
- UniCharCount lengths[] = {kATSUToTextEnd};
- ATSUAttributeTag tags[] = {kATSULineLayoutOptionsTag};
- ByteCount sizes[] = {sizeof (ATSLineLayoutOptions)};
+ static const UniCharCount lengths[] = {kATSUToTextEnd};
+ static const ATSUAttributeTag tags[] = {kATSULineLayoutOptionsTag};
+ static const ByteCount sizes[] = {sizeof (ATSLineLayoutOptions)};
static ATSLineLayoutOptions line_layout =
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
kATSLineDisableAllLayoutOperations | kATSLineUseDeviceMetrics
@@ -837,7 +838,7 @@ atsu_get_text_layout_with_text_ptr (text, text_length, style, text_layout)
kATSLineIsDisplayOnly | kATSLineFractDisable
#endif
;
- ATSUAttributeValuePtr values[] = {&line_layout};
+ static const ATSUAttributeValuePtr values[] = {&line_layout};
err = ATSUCreateTextLayoutWithTextPtr (text,
kATSUFromTextBeginning,
@@ -960,11 +961,11 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width,
else
{
CGrafPtr port;
- CGContextRef context;
+ static CGContextRef context;
float port_height = FRAME_PIXEL_HEIGHT (f);
- ATSUAttributeTag tags[] = {kATSUCGContextTag};
- ByteCount sizes[] = {sizeof (CGContextRef)};
- ATSUAttributeValuePtr values[] = {&context};
+ static const ATSUAttributeTag tags[] = {kATSUCGContextTag};
+ static const ByteCount sizes[] = {sizeof (CGContextRef)};
+ static const ATSUAttributeValuePtr values[] = {&context};
#if USE_CG_DRAWING
context = mac_begin_cg_clip (f, gc);
@@ -1359,20 +1360,31 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width, overstrike_p)
if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
CGContextSetShouldAntialias (context, false);
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
- CGContextSetTextPosition (context, gx, gy);
- CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
- if (overstrike_p)
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ if (CGContextShowGlyphsWithAdvances != NULL)
+#endif
{
- CGContextSetTextPosition (context, gx + 1.0f, gy);
+ CGContextSetTextPosition (context, gx, gy);
CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
+ if (overstrike_p)
+ {
+ CGContextSetTextPosition (context, gx + 1.0f, gy);
+ CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
+ }
}
-#else
- for (i = 0; i < nchars; i++)
+#if MAC_OS_X_VERSION_MIN_REQUIRED == 1020
+ else
+#endif
+#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 */
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1030 || MAC_OS_X_VERSION_MIN_REQUIRED == 1020
{
- CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
- if (overstrike_p)
- CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
- gx += advances[i].width;
+ for (i = 0; i < nchars; i++)
+ {
+ CGContextShowGlyphsAtPoint (context, gx, gy, glyphs + i, 1);
+ if (overstrike_p)
+ CGContextShowGlyphsAtPoint (context, gx + 1.0f, gy, glyphs + i, 1);
+ gx += advances[i].width;
+ }
}
#endif
#if USE_CG_DRAWING
@@ -2196,7 +2208,7 @@ pcm_init (pcm, count)
static enum pcm_status
pcm_get_status (pcm)
- XCharStruct *pcm;
+ const XCharStruct *pcm;
{
int height = pcm->ascent + pcm->descent;
@@ -4219,7 +4231,7 @@ mac_focus_changed (type, dpyinfo, frame, bufp)
static void
x_detect_focus_change (dpyinfo, event, bufp)
struct mac_display_info *dpyinfo;
- EventRecord *event;
+ const EventRecord *event;
struct input_event *bufp;
{
struct frame *frame;
@@ -5232,7 +5244,7 @@ static void
x_scroll_bar_handle_click (bar, part_code, er, bufp)
struct scroll_bar *bar;
ControlPartCode part_code;
- EventRecord *er;
+ const EventRecord *er;
struct input_event *bufp;
{
int win_y, top_range;
@@ -6695,11 +6707,12 @@ xlfdpat_destroy (pat)
static struct xlfdpat *
xlfdpat_create (pattern)
- char *pattern;
+ const char *pattern;
{
struct xlfdpat *pat;
int nblocks, i, skip;
unsigned char last_char, *p, *q, *anychar_head;
+ const unsigned char *ptr;
struct xlfdpat_block *blk;
pat = xmalloc (sizeof (struct xlfdpat));
@@ -6710,9 +6723,9 @@ xlfdpat_create (pattern)
anychar_head = NULL;
q = pat->buf;
last_char = '\0';
- for (p = pattern; *p; p++)
+ for (ptr = pattern; *ptr; ptr++)
{
- unsigned char c = *p;
+ unsigned char c = *ptr;
if (c == '*')
if (last_char == '*')
@@ -6816,14 +6829,15 @@ xlfdpat_exact_p (pat)
that the pattern in *BLK matches with its prefix. Return NULL
there is no such strings. STRING must be lowered in advance. */
-static char *
+static const char *
xlfdpat_block_match_1 (blk, string, start_max)
struct xlfdpat_block *blk;
- unsigned char *string;
+ const unsigned char *string;
int start_max;
{
int start, infinity;
- unsigned char *p, *s;
+ unsigned char *p;
+ const unsigned char *s;
xassert (blk->len > 0);
xassert (start_max + blk->len <= strlen (string));
@@ -6880,17 +6894,17 @@ xlfdpat_block_match_1 (blk, string, start_max)
((b)->len == 1 ? memchr ((s), (b)->last_char, (m) + 1) \
: xlfdpat_block_match_1 (b, s, m))
-/* Check if XLFD pattern PAT, which is generated by `xfldpat_create',
+/* Check if XLFD pattern PAT, which is generated by `xlfdpat_create',
matches with STRING. STRING must be lowered in advance. */
static int
xlfdpat_match (pat, string)
struct xlfdpat *pat;
- unsigned char *string;
+ const unsigned char *string;
{
int str_len, nblocks, i, start_max;
struct xlfdpat_block *blk;
- unsigned char *s;
+ const unsigned char *s;
xassert (pat->nblocks > 0);
@@ -7061,7 +7075,7 @@ decode_mac_font_name (name, size, coding_system)
static char *
mac_to_x_fontname (name, size, style, charset)
- char *name;
+ const char *name;
int size;
Style style;
char *charset;
@@ -7108,7 +7122,8 @@ const int kDefaultFontSize = 12;
static int
parse_x_font_name (xf, family, size, style, charset)
- char *xf, *family;
+ const char *xf;
+ char *family;
int *size;
Style *style;
char *charset;
@@ -7191,10 +7206,10 @@ add_font_name_table_entry (char *font_name)
static void
add_mac_font_name (name, size, style, charset)
- char *name;
+ const char *name;
int size;
Style style;
- char *charset;
+ const char *charset;
{
if (size > 0)
add_font_name_table_entry (mac_to_x_fontname (name, size, style, charset));
@@ -7496,7 +7511,7 @@ enum xlfd_scalable_field_index
XLFD_SCL_LAST
};
-static int xlfd_scalable_fields[] =
+static const int xlfd_scalable_fields[] =
{
6, /* PIXEL_SIZE */
7, /* POINT_SIZE */
@@ -7506,14 +7521,16 @@ static int xlfd_scalable_fields[] =
static Lisp_Object
mac_do_list_fonts (pattern, maxnames)
- char *pattern;
+ const char *pattern;
int maxnames;
{
int i, n_fonts = 0;
Lisp_Object font_list = Qnil;
struct xlfdpat *pat;
- char *scaled, *ptr;
- int scl_val[XLFD_SCL_LAST], *field, *val;
+ char *scaled;
+ const char *ptr;
+ int scl_val[XLFD_SCL_LAST], *val;
+ const int *field;
int exact;
if (font_name_table == NULL) /* Initialize when first used. */
@@ -7763,7 +7780,8 @@ x_compute_min_glyph_bounds (f)
fields are present, none is '*'. */
static int
-is_fully_specified_xlfd (char *p)
+is_fully_specified_xlfd (p)
+ const char *p;
{
int i;
char *q;
@@ -7840,18 +7858,21 @@ mac_load_query_font (f, fontname)
if (strcmp (charset, "iso10646-1") == 0) /* XXX */
{
OSStatus err;
- ATSUAttributeTag tags[] = {kATSUFontTag, kATSUSizeTag,
- kATSUQDBoldfaceTag, kATSUQDItalicTag};
- ByteCount sizes[] = {sizeof (ATSUFontID), sizeof (Fixed),
- sizeof (Boolean), sizeof (Boolean)};
+ static const ATSUAttributeTag tags[] =
+ {kATSUFontTag, kATSUSizeTag,
+ kATSUQDBoldfaceTag, kATSUQDItalicTag};
+ static const ByteCount sizes[] =
+ {sizeof (ATSUFontID), sizeof (Fixed),
+ sizeof (Boolean), sizeof (Boolean)};
static Fixed size_fixed;
static Boolean bold_p, italic_p;
- ATSUAttributeValuePtr values[] = {&font_id, &size_fixed,
- &bold_p, &italic_p};
- ATSUFontFeatureType types[] = {kAllTypographicFeaturesType,
- kDiacriticsType};
- ATSUFontFeatureSelector selectors[] = {kAllTypeFeaturesOffSelector,
- kDecomposeDiacriticsSelector};
+ static const ATSUAttributeValuePtr values[] =
+ {&font_id, &size_fixed,
+ &bold_p, &italic_p};
+ static const ATSUFontFeatureType types[] =
+ {kAllTypographicFeaturesType, kDiacriticsType};
+ static const ATSUFontFeatureSelector selectors[] =
+ {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector};
Lisp_Object font_id_cons;
FMFontStyle style;
@@ -8642,7 +8663,7 @@ extern void terminate_applescript();
except `clear' (-> <clear>) on the KeyPad, `enter' (-> <kp-enter>)
on the right of the Cmd key on laptops, and fn + `enter' (->
<linefeed>). */
-static unsigned char keycode_to_xkeysym_table[] = {
+static const unsigned char keycode_to_xkeysym_table[] = {
/*0x00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*0x10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*0x20*/ 0, 0, 0, 0, 0x0d /*return*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -8679,7 +8700,7 @@ static unsigned char keycode_to_xkeysym_table[] = {
keyboard, and they may not be the same on other types of keyboards.
If the destination is identical to the source (f1 ... f12), it
doesn't map `fn' key to a modifier. */
-static unsigned char fn_keycode_to_keycode_table[] = {
+static const unsigned char fn_keycode_to_keycode_table[] = {
/*0x00*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*0x10*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*0x20*/ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -9137,7 +9158,9 @@ do_apple_menu (SInt16 menu_item)
Mesander and IM - Window Manager A. */
static void
-do_grow_window (WindowPtr w, EventRecord *e)
+do_grow_window (w, e)
+ WindowPtr w;
+ const EventRecord *e;
{
Rect limit_rect;
int rows, columns, width, height;
@@ -9321,8 +9344,8 @@ mac_store_event_ref_as_apple_event (class, id, class_key, id_key,
Lisp_Object class_key, id_key;
EventRef event;
UInt32 num_params;
- EventParamName *names;
- EventParamType *types;
+ const EventParamName *names;
+ const EventParamType *types;
{
OSStatus err = eventNotHandledErr;
Lisp_Object binding;
@@ -9383,10 +9406,10 @@ mac_handle_command_event (next_handler, event, data)
{
OSStatus result, err;
HICommand command;
- static EventParamName names[] = {kEventParamDirectObject,
- kEventParamKeyModifiers};
- static EventParamType types[] = {typeHICommand,
- typeUInt32};
+ static const EventParamName names[] =
+ {kEventParamDirectObject, kEventParamKeyModifiers};
+ static const EventParamType types[] =
+ {typeHICommand, typeUInt32};
int num_params = sizeof (names) / sizeof (names[0]);
result = CallNextEventHandler (next_handler, event);
@@ -9410,7 +9433,8 @@ mac_handle_command_event (next_handler, event, data)
static OSStatus
init_command_handler ()
{
- EventTypeSpec specs[] = {{kEventClassCommand, kEventCommandProcess}};
+ static const EventTypeSpec specs[] =
+ {{kEventClassCommand, kEventCommandProcess}};
static EventHandlerUPP handle_command_eventUPP = NULL;
if (handle_command_eventUPP == NULL)
@@ -9570,18 +9594,18 @@ mac_handle_window_event (next_handler, event, data)
case kEventWindowToolbarSwitchMode:
result = CallNextEventHandler (next_handler, event);
{
- static EventParamName names[] = {kEventParamDirectObject,
- kEventParamWindowMouseLocation,
- kEventParamKeyModifiers,
- kEventParamMouseButton,
- kEventParamClickCount,
- kEventParamMouseChord};
- static EventParamType types[] = {typeWindowRef,
- typeQDPoint,
- typeUInt32,
- typeMouseButton,
- typeUInt32,
- typeUInt32};
+ static const EventParamName names[] = {kEventParamDirectObject,
+ kEventParamWindowMouseLocation,
+ kEventParamKeyModifiers,
+ kEventParamMouseButton,
+ kEventParamClickCount,
+ kEventParamMouseChord};
+ static const EventParamType types[] = {typeWindowRef,
+ typeQDPoint,
+ typeUInt32,
+ typeMouseButton,
+ typeUInt32,
+ typeUInt32};
int num_params = sizeof (names) / sizeof (names[0]);
err = mac_store_event_ref_as_apple_event (0, 0,
@@ -9688,18 +9712,18 @@ mac_handle_font_event (next_handler, event, data)
OSStatus result, err;
Lisp_Object id_key;
int num_params;
- EventParamName *names;
- EventParamType *types;
- static EventParamName names_sel[] = {kEventParamATSUFontID,
- kEventParamATSUFontSize,
- kEventParamFMFontFamily,
- kEventParamFMFontSize,
- kEventParamFontColor};
- static EventParamType types_sel[] = {typeATSUFontID,
- typeATSUSize,
- typeFMFontFamily,
- typeFMFontSize,
- typeFontColor};
+ const EventParamName *names;
+ const EventParamType *types;
+ static const EventParamName names_sel[] = {kEventParamATSUFontID,
+ kEventParamATSUFontSize,
+ kEventParamFMFontFamily,
+ kEventParamFMFontSize,
+ kEventParamFontColor};
+ static const EventParamType types_sel[] = {typeATSUFontID,
+ typeATSUSize,
+ typeFMFontFamily,
+ typeFMFontSize,
+ typeFontColor};
result = CallNextEventHandler (next_handler, event);
if (result != eventNotHandledErr)
@@ -9740,10 +9764,10 @@ mac_handle_text_input_event (next_handler, event, data)
OSStatus result, err = noErr;
Lisp_Object id_key = Qnil;
int num_params;
- EventParamName *names;
- EventParamType *types;
+ const EventParamName *names;
+ const EventParamType *types;
static UInt32 seqno_uaia = 0;
- static EventParamName names_uaia[] =
+ static const EventParamName names_uaia[] =
{kEventParamTextInputSendComponentInstance,
kEventParamTextInputSendRefCon,
kEventParamTextInputSendSLRec,
@@ -9756,7 +9780,7 @@ mac_handle_text_input_event (next_handler, event, data)
kEventParamTextInputSendTextServiceEncoding,
kEventParamTextInputSendTextServiceMacEncoding,
EVENT_PARAM_TEXT_INPUT_SEQUENCE_NUMBER};
- static EventParamType types_uaia[] =
+ static const EventParamType types_uaia[] =
{typeComponentInstance,
typeLongInteger,
typeIntlWritingCode,
@@ -9773,12 +9797,12 @@ mac_handle_text_input_event (next_handler, event, data)
typeUInt32,
typeUInt32,
typeUInt32};
- static EventParamName names_ufke[] =
+ static const EventParamName names_ufke[] =
{kEventParamTextInputSendComponentInstance,
kEventParamTextInputSendRefCon,
kEventParamTextInputSendSLRec,
kEventParamTextInputSendText};
- static EventParamType types_ufke[] =
+ static const EventParamType types_ufke[] =
{typeComponentInstance,
typeLongInteger,
typeIntlWritingCode,
@@ -9931,12 +9955,12 @@ mac_store_service_event (event)
OSStatus err;
Lisp_Object id_key;
int num_params;
- EventParamName *names;
- EventParamType *types;
- static EventParamName names_pfm[] = {kEventParamServiceMessageName,
- kEventParamServiceUserData};
- static EventParamType types_pfm[] = {typeCFStringRef,
- typeCFStringRef};
+ const EventParamName *names;
+ const EventParamType *types;
+ static const EventParamName names_pfm[] =
+ {kEventParamServiceMessageName, kEventParamServiceUserData};
+ static const EventParamType types_pfm[] =
+ {typeCFStringRef, typeCFStringRef};
switch (GetEventKind (event))
{
@@ -9974,7 +9998,7 @@ install_window_handler (window)
{
OSStatus err = noErr;
#if USE_CARBON_EVENTS
- EventTypeSpec specs_window[] =
+ static const EventTypeSpec specs_window[] =
{{kEventClassWindow, kEventWindowUpdate},
{kEventClassWindow, kEventWindowGetIdealSize},
{kEventClassWindow, kEventWindowBoundsChanging},
@@ -9992,16 +10016,18 @@ install_window_handler (window)
{kEventClassWindow, kEventWindowFocusRelinquish},
#endif
};
- EventTypeSpec specs_mouse[] = {{kEventClassMouse, kEventMouseWheelMoved}};
+ static const EventTypeSpec specs_mouse[] =
+ {{kEventClassMouse, kEventMouseWheelMoved}};
static EventHandlerUPP handle_window_eventUPP = NULL;
static EventHandlerUPP handle_mouse_eventUPP = NULL;
#if USE_MAC_FONT_PANEL
- EventTypeSpec specs_font[] = {{kEventClassFont, kEventFontPanelClosed},
- {kEventClassFont, kEventFontSelection}};
+ static const EventTypeSpec specs_font[] =
+ {{kEventClassFont, kEventFontPanelClosed},
+ {kEventClassFont, kEventFontSelection}};
static EventHandlerUPP handle_font_eventUPP = NULL;
#endif
#if USE_MAC_TSM
- EventTypeSpec specs_text_input[] =
+ static const EventTypeSpec specs_text_input[] =
{{kEventClassTextInput, kEventTextInputUpdateActiveInputArea},
{kEventClassTextInput, kEventTextInputUnicodeForKeyEvent},
{kEventClassTextInput, kEventTextInputOffsetToPos}};
@@ -11218,7 +11244,7 @@ mac_initialize_display_info ()
static XrmDatabase
mac_make_rdb (xrm_option)
- char *xrm_option;
+ const char *xrm_option;
{
XrmDatabase database;
diff --git a/src/macterm.h b/src/macterm.h
index e33f939940c..33692a8b8d2 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -666,11 +666,11 @@ extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *));
extern OSErr mac_ae_put_lisp P_ ((AEDescList *, UInt32, Lisp_Object));
#if TARGET_API_MAC_CARBON
extern OSStatus create_apple_event_from_event_ref P_ ((EventRef, UInt32,
- EventParamName *,
- EventParamType *,
+ const EventParamName *,
+ const EventParamType *,
AppleEvent *));
extern OSErr create_apple_event_from_drag_ref P_ ((DragRef, UInt32,
- FlavorType *,
+ const FlavorType *,
AppleEvent *));
extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *));
extern CFStringRef cfstring_create_with_string P_ ((Lisp_Object));
@@ -683,9 +683,10 @@ extern Lisp_Object cfboolean_to_lisp P_ ((CFBooleanRef));
extern Lisp_Object cfobject_desc_to_lisp P_ ((CFTypeRef));
extern Lisp_Object cfproperty_list_to_lisp P_ ((CFPropertyListRef, int, int));
#endif
-extern void xrm_merge_string_database P_ ((XrmDatabase, char *));
-extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, char *, char *));
-extern XrmDatabase xrm_get_preference_database P_ ((char *));
+extern void xrm_merge_string_database P_ ((XrmDatabase, const char *));
+extern Lisp_Object xrm_get_resource P_ ((XrmDatabase, const char *,
+ const char *));
+extern XrmDatabase xrm_get_preference_database P_ ((const char *));
EXFUN (Fmac_get_preference, 4);
/* arch-tag: 6b4ca125-5bef-476d-8ee8-31ed808b7e79
diff --git a/src/minibuf.c b/src/minibuf.c
index f54feffbb21..31c0fd1768e 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1689,7 +1689,7 @@ Lisp_Object Vminibuffer_completing_file_name;
DEFUN ("completing-read", Fcompleting_read, Scompleting_read, 2, 8, 0,
doc: /* Read a string in the minibuffer, with completion.
PROMPT is a string to prompt with; normally it ends in a colon and a space.
-TABLE can be an list of strings, an alist, an obarray or a hash table.
+TABLE can be a list of strings, an alist, an obarray or a hash table.
TABLE can also be a function to do the completion itself.
PREDICATE limits completion to a subset of TABLE.
See `try-completion' and `all-completions' for more details
diff --git a/src/msdos.c b/src/msdos.c
index 8595c8f6ce9..834a32db97b 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -2639,7 +2639,7 @@ check_x (void)
#define Ctrl 0x0200 /* ctrl scan-code */
#define Shift 0x0400 /* shift scan-code */
-static int extended_kbd; /* 101 (102) keyboard present. */
+static int extended_kbd; /* 101 (102) keyboard present. */
struct kbd_translate {
unsigned char sc;
diff --git a/src/process.c b/src/process.c
index 9062e6c3d6e..7a8ad5c339b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -7074,7 +7074,7 @@ syms_of_process ()
DEFVAR_BOOL ("delete-exited-processes", &delete_exited_processes,
doc: /* *Non-nil means delete processes immediately when they exit.
-nil means don't delete them until `list-processes' is run. */);
+A value of nil means don't delete them until `list-processes' is run. */);
delete_exited_processes = 1;
diff --git a/src/regex.c b/src/regex.c
index ae80ad0cee8..c0dd6e00ffc 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -12,13 +12,13 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
+ USA. */
/* TODO:
- structure the opcode space into opcode+flag.
@@ -139,7 +139,7 @@
# endif
# define free xfree
-/* Converts the pointer to the char to BEG-based offset from the start. */
+/* Converts the pointer to the char to BEG-based offset from the start. */
# define PTR_TO_OFFSET(d) POS_AS_IN_BUFFER (POINTER_TO_OFFSET (d))
# define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object)))
@@ -540,7 +540,7 @@ init_syntax_once ()
# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
REGEX_REALLOCATE (source, osize, nsize)
-/* No need to explicitly free anything. */
+/* No need to explicitly free anything. */
# define REGEX_FREE_STACK(arg) ((void)0)
# endif /* not REGEX_MALLOC */
@@ -654,7 +654,7 @@ typedef enum
jump,
/* Followed by two-byte relative address of place to resume at
- in case of failure. */
+ in case of failure. */
on_failure_jump,
/* Like on_failure_jump, but pushes a placeholder instead of the
@@ -691,7 +691,7 @@ typedef enum
jump_n,
/* Set the following two-byte relative address to the
- subsequent two-byte number. The address *includes* the two
+ subsequent two-byte number. The address *includes* the two
bytes of number. */
set_number_at,
@@ -699,7 +699,7 @@ typedef enum
wordend, /* Succeeds if at word end. */
wordbound, /* Succeeds if at a word boundary. */
- notwordbound, /* Succeeds if not at a word boundary. */
+ notwordbound, /* Succeeds if not at a word boundary. */
symbeg, /* Succeeds if at symbol beginning. */
symend, /* Succeeds if at symbol end. */
@@ -717,8 +717,8 @@ typedef enum
after_dot, /* Succeeds if after point. */
/* Matches any character whose category-set contains the specified
- category. The operator is followed by a byte which contains a
- category code (mnemonic ASCII character). */
+ category. The operator is followed by a byte which contains a
+ category code (mnemonic ASCII character). */
categoryspec,
/* Matches any character whose category-set does not contain the
@@ -807,7 +807,7 @@ extract_number_and_incr (destination, source)
/* Store a multibyte character in three contiguous bytes starting
DESTINATION, and increment DESTINATION to the byte after where the
- character is stored. Therefore, DESTINATION must be an lvalue. */
+ character is stored. Therefore, DESTINATION must be an lvalue. */
#define STORE_CHARACTER_AND_INCR(destination, character) \
do { \
@@ -818,7 +818,7 @@ extract_number_and_incr (destination, source)
} while (0)
/* Put into DESTINATION a character stored in three contiguous bytes
- starting at SOURCE. */
+ starting at SOURCE. */
#define EXTRACT_CHARACTER(destination, source) \
do { \
@@ -854,13 +854,13 @@ extract_number_and_incr (destination, source)
&& (p)[2 + (c) / BYTEWIDTH] & (1 << ((c) % BYTEWIDTH)))
/* Return the address of end of RANGE_TABLE. COUNT is number of
- ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2'
- is start of range and end of range. `* 3' is size of each start
+ ranges (which is a pair of (start, end)) in the RANGE_TABLE. `* 2'
+ is start of range and end of range. `* 3' is size of each start
and end. */
#define CHARSET_RANGE_TABLE_END(range_table, count) \
((range_table) + (count) * 2 * 3)
-/* Test if C is in RANGE_TABLE. A flag NOT is negated if C is in.
+/* Test if C is in RANGE_TABLE. A flag NOT is negated if C is in.
COUNT is number of ranges in RANGE_TABLE. */
#define CHARSET_LOOKUP_RANGE_TABLE_RAW(not, c, range_table, count) \
do \
@@ -1667,7 +1667,7 @@ do { \
REGSTART, REGEND -- arrays of string positions.
Also assumes the variables `fail_stack' and (if debugging), `bufp',
- `pend', `string1', `size1', `string2', and `size2'. */
+ `pend', `string1', `size1', `string2', and `size2'. */
#define POP_FAILURE_POINT(str, pat) \
do { \
@@ -1936,7 +1936,7 @@ struct range_table_work_area
{
int *table; /* actual work area. */
int allocated; /* allocated size for work area in bytes. */
- int used; /* actually used size in words. */
+ int used; /* actually used size in words. */
int bits; /* flag to record character classes */
};
@@ -1978,7 +1978,7 @@ struct range_table_work_area
FREE_STACK_RETURN (tem); \
} while (0)
-/* Free allocated memory for WORK_AREA. */
+/* Free allocated memory for WORK_AREA. */
#define FREE_RANGE_TABLE_WORK_AREA(work_area) \
do { \
if ((work_area).table) \
@@ -2478,7 +2478,7 @@ regex_compile (pattern, size, syntax, bufp)
re_char *beg_interval;
/* Address of the place where a forward jump should go to the end of
- the containing expression. Each alternative of an `or' -- except the
+ the containing expression. Each alternative of an `or' -- except the
last -- ends with a forward jump of this sort. */
unsigned char *fixup_alt_jump = 0;
@@ -2550,11 +2550,11 @@ regex_compile (pattern, size, syntax, bufp)
if (bufp->buffer)
{ /* If zero allocated, but buffer is non-null, try to realloc
enough space. This loses if buffer's address is bogus, but
- that is the user's responsibility. */
+ that is the user's responsibility. */
RETALLOC (bufp->buffer, INIT_BUF_SIZE, unsigned char);
}
else
- { /* Caller did not allocate a buffer. Do it for them. */
+ { /* Caller did not allocate a buffer. Do it for them. */
bufp->buffer = TALLOC (INIT_BUF_SIZE, unsigned char);
}
if (!bufp->buffer) FREE_STACK_RETURN (REG_ESPACE);
@@ -2618,15 +2618,15 @@ regex_compile (pattern, size, syntax, bufp)
p = pattern = whitespace_regexp;
pend = p + strlen (p);
break;
- }
+ }
case '^':
{
- if ( /* If at start of pattern, it's an operator. */
+ if ( /* If at start of pattern, it's an operator. */
p == pattern + 1
- /* If context independent, it's an operator. */
+ /* If context independent, it's an operator. */
|| syntax & RE_CONTEXT_INDEP_ANCHORS
- /* Otherwise, depends on what's come before. */
+ /* Otherwise, depends on what's come before. */
|| at_begline_loc_p (pattern, p, syntax))
BUF_PUSH ((syntax & RE_NO_NEWLINE_ANCHOR) ? begbuf : begline);
else
@@ -2639,7 +2639,7 @@ regex_compile (pattern, size, syntax, bufp)
{
if ( /* If at end of pattern, it's an operator. */
p == pend
- /* If context independent, it's an operator. */
+ /* If context independent, it's an operator. */
|| syntax & RE_CONTEXT_INDEP_ANCHORS
/* Otherwise, depends on what's next. */
|| at_endline_loc_p (p, pend, syntax))
@@ -2667,14 +2667,14 @@ regex_compile (pattern, size, syntax, bufp)
}
{
- /* 1 means zero (many) matches is allowed. */
+ /* 1 means zero (many) matches is allowed. */
boolean zero_times_ok = 0, many_times_ok = 0;
boolean greedy = 1;
/* If there is a sequence of repetition chars, collapse it
down to just one (the right one). We can't combine
interval operators with these because of, e.g., `a{2}*',
- which should only match an even number of `a's. */
+ which should only match an even number of `a's. */
for (;;)
{
@@ -2714,7 +2714,7 @@ regex_compile (pattern, size, syntax, bufp)
break;
/* Now we know whether or not zero matches is allowed
- and also whether or not two or more matches is allowed. */
+ and also whether or not two or more matches is allowed. */
if (greedy)
{
if (many_times_ok)
@@ -2821,7 +2821,7 @@ regex_compile (pattern, size, syntax, bufp)
laststart = b;
/* We test `*p == '^' twice, instead of using an if
- statement, so we only need one BUF_PUSH. */
+ statement, so we only need one BUF_PUSH. */
BUF_PUSH (*p == '^' ? charset_not : charset);
if (*p == '^')
p++;
@@ -2829,7 +2829,7 @@ regex_compile (pattern, size, syntax, bufp)
/* Remember the first position in the bracket expression. */
p1 = p;
- /* Push the number of bytes in the bitmap. */
+ /* Push the number of bytes in the bitmap. */
BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
/* Clear the whole map. */
@@ -2840,7 +2840,7 @@ regex_compile (pattern, size, syntax, bufp)
&& (syntax & RE_HAT_LISTS_NOT_NEWLINE))
SET_LIST_BIT ('\n');
- /* Read in characters and ranges, setting map bits. */
+ /* Read in characters and ranges, setting map bits. */
for (;;)
{
boolean escaped_char = false;
@@ -2864,7 +2864,7 @@ regex_compile (pattern, size, syntax, bufp)
}
else
{
- /* Could be the end of the bracket expression. If it's
+ /* Could be the end of the bracket expression. If it's
not (i.e., when the bracket expression is `[]' so
far), the ']' character bit gets set way below. */
if (c == ']' && p2 != p1)
@@ -2881,7 +2881,7 @@ regex_compile (pattern, size, syntax, bufp)
if (!escaped_char &&
syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
{
- /* Leave room for the null. */
+ /* Leave room for the null. */
unsigned char str[CHAR_CLASS_MAX_LENGTH + 1];
const unsigned char *class_beg;
@@ -2939,7 +2939,8 @@ regex_compile (pattern, size, syntax, bufp)
for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
{
int translated = TRANSLATE (ch);
- if (re_iswctype (btowc (ch), cc))
+ if (translated < (1 << BYTEWIDTH)
+ && re_iswctype (btowc (ch), cc))
SET_LIST_BIT (translated);
}
@@ -2962,7 +2963,7 @@ regex_compile (pattern, size, syntax, bufp)
/* Because the `:' may starts the range, we
can't simply set bit and repeat the loop.
- Instead, just set it to C and handle below. */
+ Instead, just set it to C and handle below. */
c = ':';
}
}
@@ -3020,7 +3021,14 @@ regex_compile (pattern, size, syntax, bufp)
{
for (this_char = range_start; this_char <= range_end;
this_char++)
- SET_LIST_BIT (TRANSLATE (this_char));
+ {
+ int translated = TRANSLATE (this_char);
+ if (translated < (1 << BYTEWIDTH))
+ SET_LIST_BIT (translated);
+ else
+ SET_RANGE_TABLE_WORK_AREA
+ (range_table_work, translated, translated);
+ }
}
}
else
@@ -3029,7 +3037,7 @@ regex_compile (pattern, size, syntax, bufp)
}
/* Discard any (non)matching list bytes that are all 0 at the
- end of the map. Decrease the map-length byte too. */
+ end of the map. Decrease the map-length byte too. */
while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
b[-1]--;
b += b[-1];
@@ -3148,7 +3156,7 @@ regex_compile (pattern, size, syntax, bufp)
}
/* These are the values to restore when we hit end of this
- group. They are all relative offsets, so that if the
+ group. They are all relative offsets, so that if the
whole pattern moves because of realloc, they will still
be valid. */
COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer;
@@ -3204,7 +3212,7 @@ regex_compile (pattern, size, syntax, bufp)
{
/* We don't just want to restore into `regnum', because
later groups should continue to be numbered higher,
- as in `(ab)c(de)' -- the second group is #2. */
+ as in `(ab)c(de)' -- the second group is #2. */
regnum_t this_group_regnum;
compile_stack.avail--;
@@ -3221,7 +3229,7 @@ regex_compile (pattern, size, syntax, bufp)
pending_exact = 0;
/* We're at the end of the group, so now we know how many
- groups were inside this one. */
+ groups were inside this one. */
if (this_group_regnum <= MAX_REGNUM && this_group_regnum > 0)
BUF_PUSH_2 (stop_memory, this_group_regnum);
}
@@ -3236,7 +3244,7 @@ regex_compile (pattern, size, syntax, bufp)
goto normal_char;
/* Insert before the previous alternative a jump which
- jumps to this alternative if the former fails. */
+ jumps to this alternative if the former fails. */
GET_BUFFER_SPACE (3);
INSERT_JUMP (on_failure_jump, begalt, b + 6);
pending_exact = 0;
@@ -3373,7 +3381,7 @@ regex_compile (pattern, size, syntax, bufp)
b += 5;
/* Code to initialize the lower bound. Insert
- before the `succeed_n'. The `5' is the last two
+ before the `succeed_n'. The `5' is the last two
bytes of this `set_number_at', plus 3 bytes of
the following `succeed_n'. */
insert_op2 (set_number_at, laststart, 5, lower_bound, b);
@@ -3443,7 +3451,7 @@ regex_compile (pattern, size, syntax, bufp)
#ifdef emacs
/* There is no way to specify the before_dot and after_dot
- operators. rms says this is ok. --karl */
+ operators. rms says this is ok. --karl */
case '=':
BUF_PUSH (at_dot);
break;
@@ -3588,7 +3596,7 @@ regex_compile (pattern, size, syntax, bufp)
/* We have only one byte following the exactn for the count. */
|| *pending_exact >= (1 << BYTEWIDTH) - MAX_MULTIBYTE_LENGTH
- /* If followed by a repetition operator. */
+ /* If followed by a repetition operator. */
|| (p != pend && (*p == '*' || *p == '^'))
|| ((syntax & RE_BK_PLUS_QM)
? p + 1 < pend && *p == '\\' && (p[1] == '+' || p[1] == '?')
@@ -3680,7 +3688,7 @@ regex_compile (pattern, size, syntax, bufp)
/* Subroutines for `regex_compile'. */
-/* Store OP at LOC followed by two-byte integer parameter ARG. */
+/* Store OP at LOC followed by two-byte integer parameter ARG. */
static void
store_op1 (op, loc, arg)
@@ -3832,7 +3840,7 @@ analyse_first (p, pend, fastmap, multibyte)
boolean not;
/* If all elements for base leading-codes in fastmap is set, this
- flag is set true. */
+ flag is set true. */
boolean match_any_multibyte_characters = false;
assert (p);
@@ -3880,7 +3888,7 @@ analyse_first (p, pend, fastmap, multibyte)
/* Following are the cases which match a character. These end
- with `break'. */
+ with `break'. */
case exactn:
if (fastmap)
@@ -4102,7 +4110,7 @@ analyse_first (p, pend, fastmap, multibyte)
/* Getting here means we have found the possible starting
characters for one path of the pattern -- and that the empty
- string does not match. We need not follow this path further. */
+ string does not match. We need not follow this path further. */
return 0;
} /* while p */
@@ -4137,7 +4145,7 @@ re_compile_fastmap (bufp)
assert (fastmap && bufp->buffer);
- bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
+ bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
bufp->fastmap_accurate = 1; /* It will be when we're done. */
analysis = analyse_first (bufp->buffer, bufp->buffer + bufp->used,
@@ -4182,7 +4190,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
}
WEAK_ALIAS (__re_set_registers, re_set_registers)
-/* Searching routines. */
+/* Searching routines. */
/* Like re_search_2, below, but only one string is specified, and
doesn't let you say where to stop matching. */
@@ -4251,7 +4259,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
int endpos = startpos + range;
boolean anchored_start;
- /* Nonzero if we have to concern multibyte character. */
+ /* Nonzero if we have to concern multibyte character. */
const boolean multibyte = RE_MULTIBYTE_P (bufp);
/* Check for out-of-range STARTPOS. */
@@ -4321,7 +4329,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
/* If a fastmap is supplied, skip quickly over characters that
cannot be the start of a match. If the pattern can match the
null string, however, we don't need to skip characters; we want
- the first null string. */
+ the first null string. */
if (fastmap && startpos < total_size && !bufp->can_be_null)
{
register re_char *d;
@@ -4329,7 +4337,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
d = POS_ADDR_VSTRING (startpos);
- if (range > 0) /* Searching forwards. */
+ if (range > 0) /* Searching forwards. */
{
register int lim = 0;
int irange = range;
@@ -4403,7 +4411,7 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
startpos += irange - range;
}
- else /* Searching backwards. */
+ else /* Searching backwards. */
{
int room = (startpos >= size1
? size2 + size1 - startpos
@@ -4526,7 +4534,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2,
} \
/* Test if at very beginning or at very end of the virtual concatenation
- of `string1' and `string2'. If only one string, it's `string2'. */
+ of `string1' and `string2'. If only one string, it's `string2'. */
#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
#define AT_STRINGS_END(d) ((d) == end2)
@@ -4547,7 +4555,7 @@ static int bcmp_translate _RE_ARGS((re_char *s1, re_char *s2,
The DEC Alpha C compiler 3.x generates incorrect code for the
test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
- AT_WORD_BOUNDARY, so this code is disabled. Expanding the
+ AT_WORD_BOUNDARY, so this code is disabled. Expanding the
macro and introducing temporary variables works around the bug. */
#if 0
@@ -4749,7 +4757,7 @@ mutually_exclusive_p (bufp, p1, p2)
{
/* Now, we are sure that P2 has no range table.
So, for the size of bitmap in P2, `p2[1]' is
- enough. But P1 may have range table, so the
+ enough. But P1 may have range table, so the
size of bitmap table of P1 is extracted by
using macro `CHARSET_BITMAP_SIZE'.
@@ -4780,7 +4788,7 @@ mutually_exclusive_p (bufp, p1, p2)
{
int idx;
/* We win if the charset_not inside the loop lists
- every character listed in the charset after. */
+ every character listed in the charset after. */
for (idx = 0; idx < (int) p2[1]; idx++)
if (! (p2[2 + idx] == 0
|| (idx < CHARSET_BITMAP_SIZE (p1)
@@ -4874,7 +4882,7 @@ WEAK_ALIAS (__re_match, re_match)
#ifdef emacs
/* In Emacs, this is the string or buffer in which we
- are matching. It is used for looking up syntax properties. */
+ are matching. It is used for looking up syntax properties. */
Lisp_Object re_match_object;
#endif
@@ -4884,11 +4892,11 @@ Lisp_Object re_match_object;
matching at STOP.
If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
- store offsets for the substring each group matched in REGS. See the
+ store offsets for the substring each group matched in REGS. See the
documentation for exactly how many groups we fill.
We return -1 if no match, -2 if an internal error (such as the
- failure stack overflowing). Otherwise, we return the length of the
+ failure stack overflowing). Otherwise, we return the length of the
matched substring. */
int
@@ -4920,7 +4928,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
WEAK_ALIAS (__re_match_2, re_match_2)
/* This is a separate function so that we can force an alloca cleanup
- afterwards. */
+ afterwards. */
static int
re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
struct re_pattern_buffer *bufp;
@@ -4939,7 +4947,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
re_char *end1, *end2;
/* Pointers into string1 and string2, just past the last characters in
- each to consider matching. */
+ each to consider matching. */
re_char *end_match_1, *end_match_2;
/* Where we are in the data, and the end of the current string. */
@@ -4955,10 +4963,10 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
re_char *p = bufp->buffer;
re_char *pend = p + bufp->used;
- /* We use this to map every character in the string. */
+ /* We use this to map every character in the string. */
RE_TRANSLATE_TYPE translate = bufp->translate;
- /* Nonzero if we have to concern multibyte character. */
+ /* Nonzero if we have to concern multibyte character. */
const boolean multibyte = RE_MULTIBYTE_P (bufp);
/* Failure point stack. Each place that can handle a failure further
@@ -4967,8 +4975,8 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
the subexpressions we're currently inside, plus the number of such
registers, and, finally, two char *'s. The first char * is where
to resume scanning the pattern; the second one is where to resume
- scanning the strings. */
-#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
+ scanning the strings. */
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
fail_stack_type fail_stack;
#endif
#ifdef DEBUG
@@ -4982,7 +4990,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
#endif
/* We fill all the registers internally, independent of what we
- return, for use in backreferences. The number here includes
+ return, for use in backreferences. The number here includes
an element for register zero. */
size_t num_regs = bufp->re_nsub + 1;
@@ -5008,7 +5016,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* Logically, this is `best_regend[0]'. But we don't want to have to
allocate space for that if we're not allocating space for anything
- else (see below). Also, we never need info about register 0 for
+ else (see below). Also, we never need info about register 0 for
any of the other register vectors, and it seems rather a kludge to
treat `best_regend' differently than the rest. So we keep track of
the end of the best match so far in a separate variable. We
@@ -5066,7 +5074,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
regstart[reg] = regend[reg] = NULL;
/* We move `string1' into `string2' if the latter's empty -- but not if
- `string1' is null. */
+ `string1' is null. */
if (size2 == 0 && string1 != NULL)
{
string2 = string1;
@@ -5123,7 +5131,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
DEBUG_PRINT1 ("'\n");
- /* This loops over pattern commands. It exits by returning from the
+ /* This loops over pattern commands. It exits by returning from the
function if the match is complete, or it drops through if the match
fails at this starting point in the input data. */
for (;;)
@@ -5146,7 +5154,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
boolean best_match_p;
/* AIX compiler got confused when this was combined
- with the previous declaration. */
+ with the previous declaration. */
if (same_str_p)
best_match_p = d > match_end;
else
@@ -5184,7 +5192,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
end_match_1' while the restored d is in string2.
For example, the pattern `x.*y.*z' against the
strings `x-' and `y-z-', if the two strings are
- not consecutive in memory. */
+ not consecutive in memory. */
DEBUG_PRINT1 ("Restoring best registers.\n");
d = match_end;
@@ -5207,7 +5215,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
{
/* Have the register data arrays been allocated? */
if (bufp->regs_allocated == REGS_UNALLOCATED)
- { /* No. So allocate them with malloc. We need one
+ { /* No. So allocate them with malloc. We need one
extra element beyond `num_regs' for the `-1' marker
GNU code uses. */
regs->num_regs = MAX (RE_NREGS, num_regs + 1);
@@ -5239,7 +5247,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
else
{
/* These braces fend off a "empty body in an else-statement"
- warning under GCC when assert expands to nothing. */
+ warning under GCC when assert expands to nothing. */
assert (bufp->regs_allocated == REGS_FIXED);
}
@@ -5271,7 +5279,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
were in the pattern, set the extra elements to -1. If
we (re)allocated the registers, this is the case,
because we always allocate enough to have at least one
- -1 at the end. */
+ -1 at the end. */
for (reg = num_regs; reg < regs->num_regs; reg++)
regs->start[reg] = regs->end[reg] = -1;
} /* regs && !bufp->no_sub */
@@ -5289,7 +5297,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
return mcnt;
}
- /* Otherwise match next pattern command. */
+ /* Otherwise match next pattern command. */
switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
{
/* Ignore these. Used to ignore the n of succeed_n's which
@@ -5302,9 +5310,9 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
DEBUG_PRINT1 ("EXECUTING succeed.\n");
goto succeed_label;
- /* Match the next n pattern characters exactly. The following
+ /* Match the next n pattern characters exactly. The following
byte in the pattern defines n, and the n bytes after that
- are the characters to match. */
+ are the characters to match. */
case exactn:
mcnt = *p++;
DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
@@ -5468,7 +5476,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* The beginning of a group is represented by start_memory.
The argument is the register number. The text
matched within the group is recorded (in the internal
- registers data structure) under the register number. */
+ registers data structure) under the register number. */
case start_memory:
DEBUG_PRINT2 ("EXECUTING start_memory %d:\n", *p);
@@ -5517,14 +5525,14 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
case duplicate:
{
register re_char *d2, *dend2;
- int regno = *p++; /* Get which register to match against. */
+ int regno = *p++; /* Get which register to match against. */
DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
- /* Can't back reference a group which we've never matched. */
+ /* Can't back reference a group which we've never matched. */
if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
goto fail;
- /* Where in input to try to start matching. */
+ /* Where in input to try to start matching. */
d2 = regstart[regno];
/* Remember the start point to rollback upon failure. */
@@ -5637,7 +5645,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
pushes NULL as the value for the string on the stack. Then
`POP_FAILURE_POINT' will keep the current value for the
string, instead of restoring it. To see why, consider
- matching `foo\nbar' against `.*\n'. The .* matches the foo;
+ matching `foo\nbar' against `.*\n'. The .* matches the foo;
then the . fails against the \n. But the next thing we want
to do is match the \n against the \n; if we restored the
string value, we would be back at the foo.
@@ -5782,7 +5790,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
IMMEDIATE_QUIT_CHECK;
EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
- p += mcnt; /* Do the jump. */
+ p += mcnt; /* Do the jump. */
DEBUG_PRINT2 ("(to %p).\n", p);
break;
@@ -5875,7 +5883,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
if (/* Case 2: Only one of S1 and S2 is Sword. */
((s1 == Sword) != (s2 == Sword))
/* Case 3: Both of S1 and S2 are Sword, and macro
- WORD_BOUNDARY_P (C1, C2) returns nonzero. */
+ WORD_BOUNDARY_P (C1, C2) returns nonzero. */
|| ((s1 == Sword) && WORD_BOUNDARY_P (c1, c2)))
not = !not;
}
@@ -5889,7 +5897,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* We FAIL in one of the following cases: */
- /* Case 1: D is at the end of string. */
+ /* Case 1: D is at the end of string. */
if (AT_STRINGS_END (d))
goto fail;
else
@@ -5921,7 +5929,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
s1 = SYNTAX (c1);
/* ... and S1 is Sword, and WORD_BOUNDARY_P (C1, C2)
- returns 0. */
+ returns 0. */
if ((s1 == Sword) && !WORD_BOUNDARY_P (c1, c2))
goto fail;
}
@@ -5965,7 +5973,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
s2 = SYNTAX (c2);
/* ... and S2 is Sword, and WORD_BOUNDARY_P (C1, C2)
- returns 0. */
+ returns 0. */
if ((s2 == Sword) && !WORD_BOUNDARY_P (c1, c2))
goto fail;
}
@@ -5977,7 +5985,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
/* We FAIL in one of the following cases: */
- /* Case 1: D is at the end of string. */
+ /* Case 1: D is at the end of string. */
if (AT_STRINGS_END (d))
goto fail;
else
@@ -5994,7 +6002,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
PREFETCH ();
c2 = RE_STRING_CHAR (d, dend - d);
s2 = SYNTAX (c2);
-
+
/* Case 2: S2 is neither Sword nor Ssymbol. */
if (s2 != Sword && s2 != Ssymbol)
goto fail;
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index 02225a9226f..c23987d2d9b 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -20,5 +20,19 @@
*/
#define BROKEN_GET_CURRENT_DIR_NAME 1
+/* aix3-1.h defined _NO_PROTO, probably to work around an AIX compiler
+ that did not handle prototypes. On (at least) AIX 5.2, this causes
+ the proper prototype to be thrown away for lseek64, so compiled
+ Lisp files do not load correctly and compilation fails.
+
+ The AIX compiler should have learned about function prototypes long
+ ago, so we can probably go ahead and undefine _NO_PROTO. However,
+ if someone can demonstrate that this problem still exists for AIX
+ 4, this should be moved into a new file (aix5.h).
+*/
+
+#undef _NO_PROTO
+
+
/* arch-tag: 38fe75ea-6aef-42bd-8449-bc34d921a562
(do not change this comment) */
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 55d9a725293..7116d24c718 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -377,7 +377,7 @@ Boston, MA 02110-1301, USA. */
extern void *__libc_ia64_register_backing_store_base; \
__builtin_ia64_flushrs (); \
mark_memory (__libc_ia64_register_backing_store_base, \
- __builtin_ia64_bsp ()); \
+ __builtin_ia64_bsp (), 0); \
} while (0)
#endif
#endif
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index fa4ca565171..461df7acfba 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -279,7 +279,7 @@ Boston, MA 02110-1301, USA. */
#define HAVE_STRFTIME 1
#define LOCALTIME_CACHE
-#undef HAVE_INET_SOCKETS
+#define HAVE_INET_SOCKETS 1
#undef HAVE_AIX_SMT_EXP
diff --git a/src/s/netbsd.h b/src/s/netbsd.h
index 206ff55c854..c4bfddfbe5b 100644
--- a/src/s/netbsd.h
+++ b/src/s/netbsd.h
@@ -138,5 +138,10 @@
#define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS
+/* Use sigprocmask and friends instead of sigblock;
+ sigblock is considered obsolete on NetBSD. */
+
+#define POSIX_SIGNALS 1
+
/* arch-tag: e80f364a-04e9-4faf-93cb-f36a0fe95c81
(do not change this comment) */
diff --git a/src/s/openbsd.h b/src/s/openbsd.h
index 39e48da39a7..3b996de7059 100644
--- a/src/s/openbsd.h
+++ b/src/s/openbsd.h
@@ -21,13 +21,18 @@
#undef LD_SWITCH_SYSTEM
#ifdef __ELF__
-/* Han Boetes <han@mijncomputer.nl> says this
- is necessary, otherwise Emacs dumps core on elf systems. */
+ /* Han Boetes <han@mijncomputer.nl> says this
+ is necessary, otherwise Emacs dumps core on elf systems. */
#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp -Z
-#else
+/* The version of gcc on OpenBSD doesn't search /usr/local/lib by
+ default. */
+#define LD_SWITCH_X_DEFAULT -L/usr/local/lib
+#else
+
#define LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_tmp
+#define LD_SWITCH_X_DEFAULT -L/usr/local/lib
#endif
diff --git a/src/search.c b/src/search.c
index 7c3151b76b8..d6572c5397a 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1514,7 +1514,7 @@ simple_search (n, pat, len, len_byte, trt, pos, pos_byte, lim, lim_byte)
int this_len_byte = len_byte;
unsigned char *p = pat;
- if (pos - len < lim)
+ if (this_pos < lim || this_pos_byte < lim_byte)
goto stop;
while (this_len > 0)
diff --git a/src/sound.c b/src/sound.c
index 6f955a7d691..6f8e3ecb308 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -1015,14 +1015,14 @@ alsa_configure (sd)
val = sd->format;
err = snd_pcm_hw_params_set_format (p->handle, p->hwparams, val);
- if (err < 0)
+ if (err < 0)
alsa_sound_perror ("Could not set sound format", err);
uval = sd->sample_rate;
err = snd_pcm_hw_params_set_rate_near (p->handle, p->hwparams, &uval, 0);
if (err < 0)
alsa_sound_perror ("Could not set sample rate", err);
-
+
val = sd->channels;
err = snd_pcm_hw_params_set_channels (p->handle, p->hwparams, val);
if (err < 0)
@@ -1072,11 +1072,11 @@ alsa_configure (sd)
p->hwparams = NULL;
snd_pcm_sw_params_free (p->swparams);
p->swparams = NULL;
-
+
err = snd_pcm_prepare (p->handle);
if (err < 0)
alsa_sound_perror ("Could not prepare audio interface for use", err);
-
+
if (sd->volume > 0)
{
int chn;
@@ -1098,7 +1098,7 @@ alsa_configure (sd)
long pmin, pmax;
snd_mixer_selem_get_playback_volume_range (e, &pmin, &pmax);
long vol = pmin + (sd->volume * (pmax - pmin)) / 100;
-
+
for (chn = 0; chn <= SND_MIXER_SCHN_LAST; chn++)
snd_mixer_selem_set_playback_volume (e, chn, vol);
}
@@ -1230,9 +1230,9 @@ alsa_write (sd, buffer, nbytes)
err);
}
}
- else
+ else
alsa_sound_perror ("Error writing to sound device", err);
-
+
}
else
nwritten += err * fact;
@@ -1374,7 +1374,7 @@ do_play_sound (psz_file, ui_volume)
DEFUN ("play-sound-internal", Fplay_sound_internal, Splay_sound_internal, 1, 1, 0,
doc: /* Play sound SOUND.
-Internal use only, use `play-sound' instead.\n */)
+Internal use only, use `play-sound' instead. */)
(sound)
Lisp_Object sound;
{
diff --git a/src/strftime.c b/src/strftime.c
index 123763d8845..88800c0d408 100644
--- a/src/strftime.c
+++ b/src/strftime.c
@@ -69,9 +69,9 @@ extern char *tzname[];
#if DO_MULTIBYTE
# if HAVE_MBRLEN
# include <wchar.h>
-# ifdef HAVE_SYS__MBSTATE_H /* previously tested __hpux */
-# include <sys/_mbstate_t.h>
-# endif
+# ifdef HAVE_SYS__MBSTATE_T_H /* previously tested __hpux */
+# include <sys/_mbstate_t.h>
+# endif
# if !defined (mbsinit) && !defined (HAVE_MBSINIT)
# define mbsinit(ps) 1
# endif /* !defined (mbsinit) && !defined (HAVE_MBSINIT) */
diff --git a/src/syntax.c b/src/syntax.c
index 052191d5fef..55f73d6d106 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1470,7 +1470,7 @@ skip_chars (forwardp, syntaxp, string, lim, handle_iso_classes)
const unsigned char *class_beg = str + i_byte + 1;
const unsigned char *class_end = class_beg;
const unsigned char *class_limit = str + size_byte - 2;
- /* Leave room for the null. */
+ /* Leave room for the null. */
unsigned char class_name[CHAR_CLASS_MAX_LENGTH + 1];
re_wctype_t cc;
diff --git a/src/sysdep.c b/src/sysdep.c
index 07f5f2e8a30..1068c7a1773 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -3863,7 +3863,7 @@ set_file_times (filename, atime, mtime)
* sdcsvax!rmr or rmr@uscd
*
* Severely hacked over by John Gilmore to make a 4.2BSD compatible
- * subroutine. 11Mar86; hoptoad!gnu
+ * subroutine. 11Mar86; hoptoad!gnu
*
* Modified by rmtodd@uokmax 6-28-87 -- when making an already existing dir,
* subroutine didn't return EEXIST. It does now.
diff --git a/src/term.c b/src/term.c
index 924bebf5f7e..00c72ea8bee 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2300,6 +2300,7 @@ clear_tty_hooks (struct terminal *terminal)
terminal->mouse_position_hook = 0;
terminal->frame_rehighlight_hook = 0;
terminal->frame_raise_lower_hook = 0;
+ terminal->fullscreen_hook = 0;
terminal->set_vertical_scroll_bar_hook = 0;
terminal->condemn_scroll_bars_hook = 0;
terminal->redeem_scroll_bar_hook = 0;
diff --git a/src/termhooks.h b/src/termhooks.h
index 64a72acc360..98c4edb4f24 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -43,6 +43,11 @@ enum scroll_bar_part {
scroll_bar_move_ratio
};
+/* If the value of the frame parameter changed, whis hook is called.
+ For example, if going from fullscreen to not fullscreen this hook
+ may do something OS dependent, like extended window manager hints on X11. */
+extern void (*fullscreen_hook) P_ ((struct frame *f));
+
/* Input queue declarations and hooks. */
@@ -443,6 +448,11 @@ struct terminal
windows. */
void (*frame_raise_lower_hook) P_ ((struct frame *f, int raise));
+ /* If the value of the frame parameter changed, whis hook is called.
+ For example, if going from fullscreen to not fullscreen this hook
+ may do something OS dependent, like extended window manager hints on X11. */
+ void (*fullscreen_hook) P_ ((struct frame *f));
+
/* Scroll bar hooks. */
diff --git a/src/unexcw.c b/src/unexcw.c
index aee4f58896c..92e313c05d6 100644
--- a/src/unexcw.c
+++ b/src/unexcw.c
@@ -262,7 +262,7 @@ unexec (char *outfile, char *infile, unsigned start_data, unsigned d1,
if (bss_sbrk_did_unexec)
{
/* can only dump once */
- printf ("You can only dump emacs once on this platform.\n");
+ printf ("You can only dump Emacs once on this platform.\n");
return (1);
}
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index f65fd9cbc22..e95aa2f2efc 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -69,10 +69,10 @@ Boston, MA 02110-1301, USA. */
fact, the earliest one starts a few hundred bytes beyond the end of
the last load command. The linker option -headerpad controls the
minimum size of this padding. Its setting can be changed in
- s/darwin.h. A value of 0x300, e.g., leaves room for about 15
- additional load commands for the newly created __DATA segments (at
- 56 bytes each). Unexec fails if there is not enough room for these
- new segments.
+ s/darwin.h. A value of 0x690, e.g., leaves room for 30 additional
+ load commands for the newly created __DATA segments (at 56 bytes
+ each). Unexec fails if there is not enough room for these new
+ segments.
The __TEXT segment contains the sections __text, __cstring,
__picsymbol_stub, and __const and the __DATA segment contains the
@@ -112,6 +112,20 @@ Boston, MA 02110-1301, USA. */
#include <assert.h>
+#ifdef _LP64
+#define mach_header mach_header_64
+#define segment_command segment_command_64
+#undef VM_REGION_BASIC_INFO_COUNT
+#define VM_REGION_BASIC_INFO_COUNT VM_REGION_BASIC_INFO_COUNT_64
+#undef VM_REGION_BASIC_INFO
+#define VM_REGION_BASIC_INFO VM_REGION_BASIC_INFO_64
+#undef LC_SEGMENT
+#define LC_SEGMENT LC_SEGMENT_64
+#define vm_region vm_region_64
+#define section section_64
+#undef MH_MAGIC
+#define MH_MAGIC MH_MAGIC_64
+#endif
#define VERBOSE 1
@@ -123,9 +137,6 @@ Boston, MA 02110-1301, USA. */
mapped to dynamically loaded libraries and will not be dumped. */
#define VM_DATA_TOP (20 * 1024 * 1024)
-/* Used by malloc_freezedry and malloc_jumpstart. */
-int malloc_cookie;
-
/* Type of an element on the list of regions to be dumped. */
struct region_t {
vm_address_t address;
@@ -137,47 +148,49 @@ struct region_t {
};
/* Head and tail of the list of regions to be dumped. */
-struct region_t *region_list_head = 0;
-struct region_t *region_list_tail = 0;
+static struct region_t *region_list_head = 0;
+static struct region_t *region_list_tail = 0;
/* Pointer to array of load commands. */
-struct load_command **lca;
+static struct load_command **lca;
/* Number of load commands. */
-int nlc;
+static int nlc;
/* The highest VM address of segments loaded by the input file.
Regions with addresses beyond this are assumed to be allocated
dynamically and thus require dumping. */
-vm_address_t infile_lc_highest_addr = 0;
+static vm_address_t infile_lc_highest_addr = 0;
/* The lowest file offset used by the all sections in the __TEXT
segments. This leaves room at the beginning of the file to store
the Mach-O header. Check this value against header size to ensure
the added load commands for the new __DATA segments did not
overwrite any of the sections in the __TEXT segment. */
-unsigned long text_seg_lowest_offset = 0x10000000;
+static unsigned long text_seg_lowest_offset = 0x10000000;
/* Mach header. */
-struct mach_header mh;
+static struct mach_header mh;
/* Offset at which the next load command should be written. */
-unsigned long curr_header_offset = sizeof (struct mach_header);
+static unsigned long curr_header_offset = sizeof (struct mach_header);
-/* Current adjustment that needs to be made to offset values because
- of additional data segments. */
-unsigned long delta = 0;
+/* Offset at which the next segment should be written. */
+static unsigned long curr_file_offset = 0;
-int infd, outfd;
+static unsigned long pagesize;
+#define ROUNDUP_TO_PAGE_BOUNDARY(x) (((x) + pagesize - 1) & ~(pagesize - 1))
-int in_dumped_exec = 0;
+static int infd, outfd;
-malloc_zone_t *emacs_zone;
+static int in_dumped_exec = 0;
+
+static malloc_zone_t *emacs_zone;
/* file offset of input file's data segment */
-off_t data_segment_old_fileoff;
+static off_t data_segment_old_fileoff = 0;
-struct segment_command *data_segment_scp;
+static struct segment_command *data_segment_scp;
/* Read N bytes from infd into memory starting at address DEST.
Return true if successful, false otherwise. */
@@ -286,7 +299,7 @@ static void
print_region (vm_address_t address, vm_size_t size, vm_prot_t prot,
vm_prot_t max_prot)
{
- printf ("%#10x %#8x ", address, size);
+ printf ("%#10lx %#8lx ", (long) address, (long) size);
print_prot (prot);
putchar (' ');
print_prot (max_prot);
@@ -304,7 +317,7 @@ print_region_list ()
print_region (r->address, r->size, r->protection, r->max_protection);
}
-void
+static void
print_regions ()
{
task_t target_task = mach_task_self ();
@@ -412,23 +425,40 @@ build_region_list ()
}
-#define MAX_UNEXEC_REGIONS 200
+#define MAX_UNEXEC_REGIONS 400
-int num_unexec_regions;
-vm_range_t unexec_regions[MAX_UNEXEC_REGIONS];
+static int num_unexec_regions;
+typedef struct {
+ vm_range_t range;
+ vm_size_t filesize;
+} unexec_region_info;
+static unexec_region_info unexec_regions[MAX_UNEXEC_REGIONS];
static void
unexec_regions_recorder (task_t task, void *rr, unsigned type,
vm_range_t *ranges, unsigned num)
{
+ vm_address_t p;
+ vm_size_t filesize;
+
while (num && num_unexec_regions < MAX_UNEXEC_REGIONS)
{
- unexec_regions[num_unexec_regions++] = *ranges;
- printf ("%#8x (sz: %#8x)\n", ranges->address, ranges->size);
+ /* Subtract the size of trailing null pages from filesize. It
+ can be smaller than vmsize in segment commands. In such a
+ case, trailing pages are initialized with zeros. */
+ for (p = ranges->address + ranges->size; p > ranges->address;
+ p -= sizeof (int))
+ if (*(((int *) p)-1))
+ break;
+ filesize = ROUNDUP_TO_PAGE_BOUNDARY (p - ranges->address);
+ assert (filesize <= ranges->size);
+
+ unexec_regions[num_unexec_regions].filesize = filesize;
+ unexec_regions[num_unexec_regions++].range = *ranges;
+ printf ("%#10lx (sz: %#8lx/%#8lx)\n", (long) (ranges->address),
+ (long) filesize, (long) (ranges->size));
ranges++; num--;
}
- if (num_unexec_regions == MAX_UNEXEC_REGIONS)
- fprintf (stderr, "malloc_freezedry_recorder: too many regions\n");
}
static kern_return_t
@@ -438,7 +468,7 @@ unexec_reader (task_t task, vm_address_t address, vm_size_t size, void **ptr)
return KERN_SUCCESS;
}
-void
+static void
find_emacs_zone_regions ()
{
num_unexec_regions = 0;
@@ -449,13 +479,16 @@ find_emacs_zone_regions ()
(vm_address_t) emacs_zone,
unexec_reader,
unexec_regions_recorder);
+
+ if (num_unexec_regions == MAX_UNEXEC_REGIONS)
+ unexec_error ("find_emacs_zone_regions: too many regions");
}
static int
unexec_regions_sort_compare (const void *a, const void *b)
{
- vm_address_t aa = ((vm_range_t *) a)->address;
- vm_address_t bb = ((vm_range_t *) b)->address;
+ vm_address_t aa = ((unexec_region_info *) a)->range.address;
+ vm_address_t bb = ((unexec_region_info *) b)->range.address;
if (aa < bb)
return -1;
@@ -469,7 +502,7 @@ static void
unexec_regions_merge ()
{
int i, n;
- vm_range_t r;
+ unexec_region_info r;
qsort (unexec_regions, num_unexec_regions, sizeof (unexec_regions[0]),
&unexec_regions_sort_compare);
@@ -477,9 +510,11 @@ unexec_regions_merge ()
r = unexec_regions[0];
for (i = 1; i < num_unexec_regions; i++)
{
- if (r.address + r.size == unexec_regions[i].address)
+ if (r.range.address + r.range.size == unexec_regions[i].range.address
+ && r.range.size - r.filesize < 2 * pagesize)
{
- r.size += unexec_regions[i].size;
+ r.filesize = r.range.size + unexec_regions[i].filesize;
+ r.range.size += unexec_regions[i].range.size;
}
else
{
@@ -500,7 +535,11 @@ print_load_command_name (int lc)
switch (lc)
{
case LC_SEGMENT:
+#ifndef _LP64
printf ("LC_SEGMENT ");
+#else
+ printf ("LC_SEGMENT_64 ");
+#endif
break;
case LC_LOAD_DYLINKER:
printf ("LC_LOAD_DYLINKER ");
@@ -541,14 +580,14 @@ print_load_command (struct load_command *lc)
int j;
scp = (struct segment_command *) lc;
- printf (" %-16.16s %#10x %#8x\n",
- scp->segname, scp->vmaddr, scp->vmsize);
+ printf (" %-16.16s %#10lx %#8lx\n",
+ scp->segname, (long) (scp->vmaddr), (long) (scp->vmsize));
sectp = (struct section *) (scp + 1);
for (j = 0; j < scp->nsects; j++)
{
- printf (" %-16.16s %#10x %#8x\n",
- sectp->sectname, sectp->addr, sectp->size);
+ printf (" %-16.16s %#10lx %#8lx\n",
+ sectp->sectname, (long) (sectp->addr), (long) (sectp->size));
sectp++;
}
}
@@ -620,7 +659,7 @@ read_load_commands ()
printf ("Highest address of load commands in input file: %#8x\n",
infile_lc_highest_addr);
- printf ("Lowest offset of all sections in __TEXT segment: %#8x\n",
+ printf ("Lowest offset of all sections in __TEXT segment: %#8lx\n",
text_seg_lowest_offset);
printf ("--- List of Load Commands in Input File ---\n");
@@ -644,21 +683,23 @@ copy_segment (struct load_command *lc)
struct section *sectp;
int j;
- scp->fileoff += delta;
+ scp->fileoff = curr_file_offset;
sectp = (struct section *) (scp + 1);
for (j = 0; j < scp->nsects; j++)
{
- sectp->offset += delta;
+ sectp->offset += curr_file_offset - old_fileoff;
sectp++;
}
- printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
- scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
- scp->filesize);
+ printf ("Writing segment %-16.16s @ %#8lx (%#8lx/%#8lx @ %#10lx)\n",
+ scp->segname, (long) (scp->fileoff), (long) (scp->filesize),
+ (long) (scp->vmsize), (long) (scp->vmaddr));
if (!unexec_copy (scp->fileoff, old_fileoff, scp->filesize))
unexec_error ("cannot copy segment from input to output file");
+ curr_file_offset += ROUNDUP_TO_PAGE_BOUNDARY (scp->filesize);
+
if (!unexec_write (curr_header_offset, lc, lc->cmdsize))
unexec_error ("cannot write load command to header");
@@ -683,14 +724,18 @@ copy_data_segment (struct load_command *lc)
struct segment_command *scp = (struct segment_command *) lc;
struct section *sectp;
int j;
- unsigned long header_offset, file_offset, old_file_offset;
+ unsigned long header_offset, old_file_offset;
- printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
- scp->segname, scp->fileoff, scp->fileoff + scp->filesize,
- scp->filesize);
+ /* The new filesize of the segment is set to its vmsize because data
+ blocks for segments must start at region boundaries. Note that
+ this may leave unused locations at the end of the segment data
+ block because the total of the sizes of all sections in the
+ segment is generally smaller than vmsize. */
+ scp->filesize = scp->vmsize;
- if (delta != 0)
- unexec_error ("cannot handle multiple DATA segments in input file");
+ printf ("Writing segment %-16.16s @ %#8lx (%#8lx/%#8lx @ %#10lx)\n",
+ scp->segname, curr_file_offset, (long)(scp->filesize),
+ (long)(scp->vmsize), (long) (scp->vmaddr));
/* Offsets in the output file for writing the next section structure
and segment data block, respectively. */
@@ -700,7 +745,7 @@ copy_data_segment (struct load_command *lc)
for (j = 0; j < scp->nsects; j++)
{
old_file_offset = sectp->offset;
- sectp->offset = sectp->addr - scp->vmaddr + scp->fileoff;
+ sectp->offset = sectp->addr - scp->vmaddr + curr_file_offset;
/* The __data section is dumped from memory. The __bss and
__common sections are also dumped from memory but their flag
fields require changing (from S_ZEROFILL to S_REGULAR). The
@@ -762,21 +807,16 @@ copy_data_segment (struct load_command *lc)
else
unexec_error ("unrecognized section name in __DATA segment");
- printf (" section %-16.16s at %#8x - %#8x (sz: %#8x)\n",
- sectp->sectname, sectp->offset, sectp->offset + sectp->size,
- sectp->size);
+ printf (" section %-16.16s at %#8lx - %#8lx (sz: %#8lx)\n",
+ sectp->sectname, (long) (sectp->offset),
+ (long) (sectp->offset + sectp->size), (long) (sectp->size));
header_offset += sizeof (struct section);
sectp++;
}
- /* The new filesize of the segment is set to its vmsize because data
- blocks for segments must start at region boundaries. Note that
- this may leave unused locations at the end of the segment data
- block because the total of the sizes of all sections in the
- segment is generally smaller than vmsize. */
- delta = scp->vmsize - scp->filesize;
- scp->filesize = scp->vmsize;
+ curr_file_offset += ROUNDUP_TO_PAGE_BOUNDARY (scp->filesize);
+
if (!unexec_write (curr_header_offset, scp, sizeof (struct segment_command)))
unexec_error ("cannot write header of __DATA segment");
curr_header_offset += lc->cmdsize;
@@ -784,8 +824,7 @@ copy_data_segment (struct load_command *lc)
/* Create new __DATA segment load commands for regions on the region
list that do not corresponding to any segment load commands in
the input file.
- */
- file_offset = scp->fileoff + scp->filesize;
+ */
for (j = 0; j < num_unexec_regions; j++)
{
struct segment_command sc;
@@ -793,23 +832,22 @@ copy_data_segment (struct load_command *lc)
sc.cmd = LC_SEGMENT;
sc.cmdsize = sizeof (struct segment_command);
strncpy (sc.segname, SEG_DATA, 16);
- sc.vmaddr = unexec_regions[j].address;
- sc.vmsize = unexec_regions[j].size;
- sc.fileoff = file_offset;
- sc.filesize = unexec_regions[j].size;
+ sc.vmaddr = unexec_regions[j].range.address;
+ sc.vmsize = unexec_regions[j].range.size;
+ sc.fileoff = curr_file_offset;
+ sc.filesize = unexec_regions[j].filesize;
sc.maxprot = VM_PROT_READ | VM_PROT_WRITE;
sc.initprot = VM_PROT_READ | VM_PROT_WRITE;
sc.nsects = 0;
sc.flags = 0;
- printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
- sc.segname, sc.fileoff, sc.fileoff + sc.filesize,
- sc.filesize);
+ printf ("Writing segment %-16.16s @ %#8lx (%#8lx/%#8lx @ %#10lx)\n",
+ sc.segname, (long) (sc.fileoff), (long) (sc.filesize),
+ (long) (sc.vmsize), (long) (sc.vmaddr));
- if (!unexec_write (sc.fileoff, (void *) sc.vmaddr, sc.vmsize))
+ if (!unexec_write (sc.fileoff, (void *) sc.vmaddr, sc.filesize))
unexec_error ("cannot write new __DATA segment");
- delta += sc.filesize;
- file_offset += sc.filesize;
+ curr_file_offset += ROUNDUP_TO_PAGE_BOUNDARY (sc.filesize);
if (!unexec_write (curr_header_offset, &sc, sc.cmdsize))
unexec_error ("cannot write new __DATA segment's header");
@@ -821,7 +859,7 @@ copy_data_segment (struct load_command *lc)
/* Copy a LC_SYMTAB load command from the input file to the output
file, adjusting the file offset fields. */
static void
-copy_symtab (struct load_command *lc)
+copy_symtab (struct load_command *lc, long delta)
{
struct symtab_command *stp = (struct symtab_command *) lc;
@@ -898,7 +936,7 @@ unrelocate (const char *name, off_t reloff, int nrel)
/* Copy a LC_DYSYMTAB load command from the input file to the output
file, adjusting the file offset fields. */
static void
-copy_dysymtab (struct load_command *lc)
+copy_dysymtab (struct load_command *lc, long delta)
{
struct dysymtab_command *dstp = (struct dysymtab_command *) lc;
@@ -927,7 +965,7 @@ copy_dysymtab (struct load_command *lc)
/* Copy a LC_TWOLEVEL_HINTS load command from the input file to the output
file, adjusting the file offset fields. */
static void
-copy_twolevelhints (struct load_command *lc)
+copy_twolevelhints (struct load_command *lc, long delta)
{
struct twolevel_hints_command *tlhp = (struct twolevel_hints_command *) lc;
@@ -964,6 +1002,7 @@ static void
dump_it ()
{
int i;
+ long linkedit_delta = 0;
printf ("--- Load Commands written to Output File ---\n");
@@ -977,6 +1016,9 @@ dump_it ()
{
/* save data segment file offset and segment_command for
unrelocate */
+ if (data_segment_old_fileoff)
+ unexec_error ("cannot handle multiple DATA segments"
+ " in input file");
data_segment_old_fileoff = scp->fileoff;
data_segment_scp = scp;
@@ -984,18 +1026,26 @@ dump_it ()
}
else
{
+ if (strncmp (scp->segname, SEG_LINKEDIT, 16) == 0)
+ {
+ if (linkedit_delta)
+ unexec_error ("cannot handle multiple LINKEDIT segments"
+ " in input file");
+ linkedit_delta = curr_file_offset - scp->fileoff;
+ }
+
copy_segment (lca[i]);
}
}
break;
case LC_SYMTAB:
- copy_symtab (lca[i]);
+ copy_symtab (lca[i], linkedit_delta);
break;
case LC_DYSYMTAB:
- copy_dysymtab (lca[i]);
+ copy_dysymtab (lca[i], linkedit_delta);
break;
case LC_TWOLEVEL_HINTS:
- copy_twolevelhints (lca[i]);
+ copy_twolevelhints (lca[i], linkedit_delta);
break;
default:
copy_other (lca[i]);
@@ -1005,7 +1055,7 @@ dump_it ()
if (curr_header_offset > text_seg_lowest_offset)
unexec_error ("not enough room for load commands for new __DATA segments");
- printf ("%d unused bytes follow Mach-O header\n",
+ printf ("%ld unused bytes follow Mach-O header\n",
text_seg_lowest_offset - curr_header_offset);
mh.sizeofcmds = curr_header_offset - sizeof (struct mach_header);
@@ -1024,6 +1074,7 @@ unexec (char *outfile, char *infile, void *start_data, void *start_bss,
if (in_dumped_exec)
unexec_error ("Unexec from a dumped executable is not supported.");
+ pagesize = getpagesize ();
infd = open (infile, O_RDONLY, 0);
if (infd < 0)
{
@@ -1081,8 +1132,8 @@ ptr_in_unexec_regions (void *ptr)
int i;
for (i = 0; i < num_unexec_regions; i++)
- if ((vm_address_t) ptr - unexec_regions[i].address
- < unexec_regions[i].size)
+ if ((vm_address_t) ptr - unexec_regions[i].range.address
+ < unexec_regions[i].range.size)
return 1;
return 0;
diff --git a/src/w16select.c b/src/w16select.c
index cd3098bae52..ea9d9aea190 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -590,7 +590,7 @@ DEFUN ("w16-set-clipboard-data", Fw16_set_clipboard_data, Sw16_set_clipboard_dat
message2 (system_error_msg, sizeof (system_error_msg) - 1, 0);
break;
}
- sit_for (2, 0, 0, 1, 1);
+ sit_for (make_number (2), 0, 2);
}
done:
diff --git a/src/w32fns.c b/src/w32fns.c
index f7e211649e0..6313afe7867 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2080,32 +2080,7 @@ w32_createwindow (f)
if (!hprevinst)
{
- Lisp_Object ifa;
-
w32_init_class (hinst);
-
- /* Handle the -geometry command line option and the geometry
- settings in the registry. They are decoded and put into
- initial-frame-alist by w32-win.el:x-handle-geometry. */
- ifa = Fsymbol_value (intern ("initial-frame-alist"));
- if (CONSP (ifa))
- {
- Lisp_Object lt = Fassq (Qleft, ifa);
- Lisp_Object tp = Fassq (Qtop, ifa);
-
- if (!NILP (lt))
- {
- lt = XCDR (lt);
- if (INTEGERP (lt))
- left = lt;
- }
- if (!NILP (tp))
- {
- tp = XCDR (tp);
- if (INTEGERP (tp))
- top = tp;
- }
- }
}
if (f->size_hint_flags & USPosition || f->size_hint_flags & PPosition)
@@ -2714,9 +2689,8 @@ cancel_all_deferred_msgs ()
PostThreadMessage (dwWindowsThreadId, WM_NULL, 0, 0);
}
-DWORD
-w32_msg_worker (dw)
- DWORD dw;
+DWORD WINAPI
+w32_msg_worker (void *arg)
{
MSG msg;
deferred_msg dummy_buf;
@@ -8070,17 +8044,39 @@ DEFUN ("w32-shell-execute", Fw32_shell_execute, Sw32_shell_execute, 2, 4, 0,
doc: /* Get Windows to perform OPERATION on DOCUMENT.
This is a wrapper around the ShellExecute system function, which
invokes the application registered to handle OPERATION for DOCUMENT.
-OPERATION is typically \"open\", \"print\" or \"explore\" (but can be
-nil for the default action), and DOCUMENT is typically the name of a
-document file or URL, but can also be a program executable to run or
-a directory to open in the Windows Explorer.
-
-If DOCUMENT is a program executable, PARAMETERS can be a string
-containing command line parameters, but otherwise should be nil.
-SHOW-FLAG can be used to control whether the invoked application is hidden
-or minimized. If SHOW-FLAG is nil, the application is displayed normally,
-otherwise it is an integer representing a ShowWindow flag:
+OPERATION is either nil or a string that names a supported operation.
+What operations can be used depends on the particular DOCUMENT and its
+handler application, but typically it is one of the following common
+operations:
+
+ \"open\" - open DOCUMENT, which could be a file, a directory, or an
+ executable program. If it is an application, that
+ application is launched in the current buffer's default
+ directory. Otherwise, the application associated with
+ DOCUMENT is launched in the buffer's default directory.
+ \"print\" - print DOCUMENT, which must be a file
+ \"explore\" - start the Windows Explorer on DOCUMENT
+ \"edit\" - launch an editor and open DOCUMENT for editing; which
+ editor is launched depends on the association for the
+ specified DOCUMENT
+ \"find\" - initiate search starting from DOCUMENT which must specify
+ a directory
+ nil - invoke the default OPERATION, or \"open\" if default is
+ not defined or unavailable
+
+DOCUMENT is typically the name of a document file or a URL, but can
+also be a program executable to run, or a directory to open in the
+Windows Explorer.
+
+If DOCUMENT is a program executable, the optional arg PARAMETERS can
+be a string containing command line parameters that will be passed to
+the program; otherwise, PARAMETERS should be nil or unspecified.
+
+Second optional argument SHOW-FLAG can be used to control how the
+application will be displayed when it is invoked. If SHOW-FLAG is nil
+or unspceified, the application is displayed normally, otherwise it is
+an integer representing a ShowWindow flag:
0 - start hidden
1 - start normally
diff --git a/src/w32menu.c b/src/w32menu.c
index 3a4dc20fc15..d5c38bee336 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -235,10 +235,6 @@ static int menu_items_n_panes;
/* Current depth within submenus. */
static int menu_items_submenu_depth;
-/* Flag which when set indicates a dialog or menu has been posted by
- Xt on behalf of one of the widget sets. */
-static int popup_activated_flag;
-
static int next_menubar_widget_id;
/* This is set nonzero after the user activates the menu bar, and set
@@ -2148,7 +2144,6 @@ w32_dialog_show (f, keymaps, title, header, error)
/* Display the menu. */
lw_pop_up_all_widgets (dialog_id);
- popup_activated_flag = 1;
/* Process events that apply to the menu. */
popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id);
@@ -2428,13 +2423,6 @@ fill_in_menu (HMENU menu, widget_value *wv)
return 1;
}
-int
-popup_activated ()
-{
- /* popup_activated_flag not actually used on W32 */
- return 0;
-}
-
/* Display help string for currently pointed to menu item. Not
supported on NT 3.51 and earlier, as GetMenuItemInfo is not
available. */
@@ -2537,6 +2525,21 @@ w32_free_menu_strings (hwnd)
#endif /* HAVE_MENUS */
+/* The following is used by delayed window autoselection. */
+
+DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
+ doc: /* Return t if a menu or popup dialog is active on selected frame. */)
+ ()
+{
+#ifdef HAVE_MENUS
+ FRAME_PTR f;
+ f = SELECTED_FRAME ();
+ return (f->output_data.w32->menubar_active > 0) ? Qt : Qnil;
+#else
+ return Qnil;
+#endif /* HAVE_MENUS */
+}
+
void syms_of_w32menu ()
{
globals_of_w32menu ();
@@ -2549,6 +2552,7 @@ void syms_of_w32menu ()
staticpro (&Qdebug_on_next_call);
defsubr (&Sx_popup_menu);
+ defsubr (&Smenu_or_popup_active_p);
#ifdef HAVE_MENUS
defsubr (&Sx_popup_dialog);
#endif
diff --git a/src/w32proc.c b/src/w32proc.c
index 29491931015..7d27172781d 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -486,7 +486,8 @@ sys_wait (int *status)
{
for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--)
/* some child_procs might be sockets; ignore them */
- if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess)
+ if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess
+ && (cp->fd < 0 || (fd_info[cp->fd].flags & FILE_AT_EOF) != 0))
{
wait_hnd[nh] = cp->procinfo.hProcess;
cps[nh] = cp;
diff --git a/src/w32term.c b/src/w32term.c
index 948a5553e5d..bd3db15e11a 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4439,7 +4439,7 @@ w32_read_socket (sd, expected, hold_quit)
/* Ignore any mouse motion that happened before this
event; any subsequent mouse-movement Emacs events
should reflect only motion after the
- ButtonPress. */
+ ButtonPress. */
f->mouse_moved = 0;
}
last_mouse_frame = f;
@@ -6282,7 +6282,7 @@ x_delete_display (dpyinfo)
/* Set up use of W32. */
-DWORD w32_msg_worker ();
+DWORD WINAPI w32_msg_worker (void * arg);
void
x_flush (struct frame * f)
@@ -6388,8 +6388,8 @@ w32_initialize ()
PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE);
hWindowsThread = CreateThread (NULL, 0,
- (LPTHREAD_START_ROUTINE) w32_msg_worker,
- 0, 0, &dwWindowsThreadId);
+ w32_msg_worker,
+ 0, 0, &dwWindowsThreadId);
GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
}
diff --git a/src/window.c b/src/window.c
index e996fc5c597..c46df0ef04d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3267,6 +3267,10 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
struct window *w = XWINDOW (window);
struct buffer *b = XBUFFER (buffer);
int count = SPECPDL_INDEX ();
+#ifdef HAVE_WINDOW_SYSTEM
+ struct frame *f = XFRAME (w->frame);
+ Display_Info *dpyinfo;
+#endif
w->buffer = buffer;
@@ -3347,6 +3351,15 @@ set_window_buffer (window, buffer, run_hooks_p, keep_margins_p)
call1 (Vrun_hooks, Qwindow_configuration_change_hook);
}
+#ifdef HAVE_WINDOW_SYSTEM
+ BLOCK_INPUT;
+ if (f && FRAME_X_OUTPUT (f)
+ && (dpyinfo = FRAME_X_DISPLAY_INFO (f))
+ && EQ (window, dpyinfo->mouse_face_window))
+ clear_mouse_face (dpyinfo);
+ UNBLOCK_INPUT;
+#endif
+
unbind_to (count, Qnil);
}
diff --git a/src/xdisp.c b/src/xdisp.c
index d99f7a9ad1d..0928d011a61 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6815,7 +6815,12 @@ move_it_to (it, to_charpos, to_x, to_y, to_vpos, op)
break;
case MOVE_LINE_CONTINUED:
- it->continuation_lines_width += it->current_x;
+ /* For continued lines ending in a tab, some of the glyphs
+ associated with the tab are displayed on the current
+ line. Since it->current_x does not include these glyphs,
+ we use it->last_visible_x instead. */
+ it->continuation_lines_width +=
+ (it->c == '\t') ? it->last_visible_x : it->current_x;
break;
default:
@@ -17396,7 +17401,7 @@ pint2str (buf, width, d)
/* Write a null-terminated, right justified decimal and "human
readable" representation of the nonnegative integer D to BUF using
- a minimal field width WIDTH. D should be smaller than 999.5e24. */
+ a minimal field width WIDTH. D should be smaller than 999.5e24. */
static const char power_letter[] =
{
@@ -22650,7 +22655,7 @@ note_mouse_highlight (f, x, y)
struct buffer *b;
/* When a menu is active, don't highlight because this looks odd. */
-#if defined (USE_X_TOOLKIT) || defined (USE_GTK) || defined (HAVE_NTGUI)
+#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
if (popup_activated ())
return;
#endif
diff --git a/src/xfaces.c b/src/xfaces.c
index b55118acdf0..ec20445b7dc 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6195,7 +6195,7 @@ face for italic. */)
(attributes, display)
Lisp_Object attributes, display;
{
- int supports, i;
+ int supports = 0, i;
Lisp_Object frame;
struct frame *f;
struct face *def_face;
@@ -7089,10 +7089,18 @@ realize_default_face (f)
#ifdef HAVE_WINDOW_SYSTEM
#ifdef HAVE_X_WINDOWS
if (FRAME_X_P (f) && face->font != FRAME_FONT (f))
- /* As the font specified for the frame was not acceptable as a
- font for the default face (perhaps because auto-scaled fonts
- are rejected), we must adjust the frame font. */
- x_set_font (f, build_string (face->font_name), Qnil);
+ {
+ /* This can happen when making a frame on a display that does
+ not support the default font. */
+ if (!face->font)
+ return 0;
+
+ /* Otherwise, the font specified for the frame was not
+ acceptable as a font for the default face (perhaps because
+ auto-scaled fonts are rejected), so we must adjust the frame
+ font. */
+ x_set_font (f, build_string (face->font_name), Qnil);
+ }
#endif /* HAVE_X_WINDOWS */
#endif /* HAVE_WINDOW_SYSTEM */
return 1;
diff --git a/src/xfns.c b/src/xfns.c
index 1cd8265d20f..8b4ab0ca363 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2143,27 +2143,35 @@ xic_create_xfontset (f, base_fontname)
if (!xfs)
{
char *fontsetname = xic_create_fontsetname (base_fontname, False);
- char *p0 = fontsetname, *p1;
/* New fontset. */
- /* FONTSETNAME contains a list of font names (specific fonts
- first, general fonts last), but giving that to XCreateFontSet
- at once occasionally fails (bug of X?). So, we try to call
- XCreateFontSet for each fontname. */
-
- while (p0)
+ xfs = XCreateFontSet (FRAME_X_DISPLAY (f),
+ fontsetname, &missing_list,
+ &missing_count, &def_string);
+ if (missing_list)
+ XFreeStringList (missing_list);
+ if (! xfs)
{
- p1 = strchr (p0, ',');
- if (p1)
- *p1 = '\0';
- xfs = XCreateFontSet (FRAME_X_DISPLAY (f),
- p0, &missing_list,
- &missing_count, &def_string);
- if (missing_list)
- XFreeStringList (missing_list);
- if (xfs)
- break;
- p0 = p1 ? p1 + 1 : NULL;
+ /* FONTSETNAME contains a list of font names (specific fonts
+ first, general fonts last), but giving that to
+ XCreateFontSet at once occasionally fails (bug of X?).
+ So, we try to call XCreateFontSet for each fontname. */
+ char *p0 = fontsetname, *p1;
+
+ while (p0)
+ {
+ p1 = strchr (p0, ',');
+ if (p1)
+ *p1 = '\0';
+ xfs = XCreateFontSet (FRAME_X_DISPLAY (f),
+ p0, &missing_list,
+ &missing_count, &def_string);
+ if (missing_list)
+ XFreeStringList (missing_list);
+ if (xfs)
+ break;
+ p0 = p1 ? p1 + 1 : NULL;
+ }
}
xfree (fontsetname);
}
diff --git a/src/xmenu.c b/src/xmenu.c
index b615d321cc7..b4665f88e07 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -825,7 +825,7 @@ no quit occurs and `x-popup-menu' returns nil. */)
int xpos = 0, ypos = 0;
Lisp_Object title;
char *error_name = NULL;
- Lisp_Object selection;
+ Lisp_Object selection = Qnil;
FRAME_PTR f = NULL;
Lisp_Object x, y, window;
int keymaps = 0;
@@ -1404,8 +1404,13 @@ If FRAME is nil or not given, use the selected frame. */)
Lisp_Object frame;
{
GtkWidget *menubar;
+ FRAME_PTR f;
+
+ /* gcc 2.95 doesn't accept the FRAME_PTR declaration after
+ BLOCK_INPUT. */
+
BLOCK_INPUT;
- FRAME_PTR f = check_x_frame (frame);
+ f = check_x_frame (frame);
if (FRAME_EXTERNAL_MENU_BAR (f))
set_frame_menubar (f, 0, 1);
@@ -1418,7 +1423,7 @@ If FRAME is nil or not given, use the selected frame. */)
gtk_menu_shell_select_item (GTK_MENU_SHELL (menubar),
GTK_WIDGET (children->data));
-
+
popup_activated_flag = 1;
g_list_free (children);
}
@@ -1495,14 +1500,6 @@ x_activate_menubar (f)
f->output_data.x->saved_menu_event->type = 0;
}
-/* Detect if a dialog or menu has been posted. */
-
-int
-popup_activated ()
-{
- return popup_activated_flag;
-}
-
/* This callback is invoked when the user selects a menubar cascade
pushbutton, but before the pulldown menu is posted. */
@@ -3801,6 +3798,27 @@ xmenu_show (f, x, y, for_click, keymaps, title, error)
#endif /* not USE_X_TOOLKIT */
#endif /* HAVE_MENUS */
+
+/* Detect if a dialog or menu has been posted. */
+
+int
+popup_activated ()
+{
+ return popup_activated_flag;
+}
+
+/* The following is used by delayed window autoselection. */
+
+DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_p, 0, 0, 0,
+ doc: /* Return t if a menu or popup dialog is active. */)
+ ()
+{
+#ifdef HAVE_MENUS
+ return (popup_activated ()) ? Qt : Qnil;
+#else
+ return Qnil;
+#endif /* HAVE_MENUS */
+}
void
syms_of_xmenu ()
@@ -3818,6 +3836,7 @@ syms_of_xmenu ()
#endif
defsubr (&Sx_popup_menu);
+ defsubr (&Smenu_or_popup_active_p);
#if defined (USE_GTK) || defined (USE_X_TOOLKIT)
defsubr (&Sx_menu_bar_open_internal);
diff --git a/src/xselect.c b/src/xselect.c
index e6103043dce..54b20d89d5f 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -123,8 +123,8 @@ Lisp_Object QCUT_BUFFER0, QCUT_BUFFER1, QCUT_BUFFER2, QCUT_BUFFER3,
static Lisp_Object Vx_lost_selection_functions;
static Lisp_Object Vx_sent_selection_functions;
-/* Coding system for communicating with other X clients via cutbuffer,
- selection, and clipboard. */
+/* Coding system for communicating with other X clients via selection
+ and clipboard. */
static Lisp_Object Vselection_coding_system;
/* Coding system for the next communicating with other X clients. */
@@ -843,7 +843,7 @@ x_reply_selection_request (event, format, data, size, type)
break;
/* Now wait for the requester to ack this chunk by deleting the
- property. This can run random lisp code or signal. */
+ property. This can run random lisp code or signal. */
TRACE1 ("Waiting for increment ACK (deletion of %s)",
XGetAtomName (display, reply.property));
wait_for_property_change (wait_object);
@@ -2742,11 +2742,11 @@ FRAME is on. If FRAME is nil, the selected frame is used. */)
else
error ("ATOM must be a symbol or a string");
- for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i)
+ for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i)
if (dpyinfo->x_dnd_atoms[i] == x_atom)
return Qnil;
- if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size)
+ if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size)
{
dpyinfo->x_dnd_atoms_size *= 2;
dpyinfo->x_dnd_atoms = xrealloc (dpyinfo->x_dnd_atoms,
@@ -2776,7 +2776,7 @@ x_handle_dnd_message (f, event, dpyinfo, bufp)
int idata[5];
size_t i;
- for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i)
+ for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i)
if (dpyinfo->x_dnd_atoms[i] == event->message_type) break;
if (i == dpyinfo->x_dnd_atoms_length) return 0;
@@ -3007,8 +3007,8 @@ it merely informs you that they have happened. */);
DEFVAR_LISP ("selection-coding-system", &Vselection_coding_system,
doc: /* Coding system for communicating with other X clients.
-When sending or receiving text via cut_buffer, selection, and clipboard,
-the text is encoded or decoded by this coding system.
+When sending or receiving text via selection and clipboard, the text is
+encoded or decoded by this coding system.
The default value is `compound-text-with-extensions'. */);
Vselection_coding_system = intern ("compound-text-with-extensions");
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 974b3a1c6ad..1e4618ed567 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -570,7 +570,7 @@ See also `x-session-previous-id', `emacs-save-session-functions',
DEFVAR_LISP ("x-session-previous-id", &Vx_session_previous_id,
doc: /* The previous session id Emacs got from session manager.
If Emacs is running on a window system that has a session manager, the
-session manager gives Emacs a session id. It is feasible for Emacs lisp
+session manager gives Emacs a session id. It is feasible for Emacs Lisp
code to use the session id to save configuration in, for example, a file
with a file name based on the session id. If Emacs is running when the
window system is shut down, the session manager remembers that Emacs was
diff --git a/src/xterm.c b/src/xterm.c
index 95b2a87fd4b..7bbd2736307 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8336,6 +8336,119 @@ x_set_offset (f, xoff, yoff, change_gravity)
UNBLOCK_INPUT;
}
+/* Do fullscreen as specified in extended window manager hints */
+static int
+do_ewmh_fullscreen (f)
+ struct frame *f;
+{
+ int have_net_atom = FRAME_X_DISPLAY_INFO (f)->have_net_atoms;
+
+ if (!have_net_atom)
+ {
+ int num;
+ Atom *atoms = XListProperties (FRAME_X_DISPLAY (f),
+ FRAME_X_DISPLAY_INFO (f)->root_window,
+ &num);
+ if (atoms && num > 0)
+ {
+ char **names = (char **) xmalloc (num * sizeof(*names));
+ if (XGetAtomNames (FRAME_X_DISPLAY (f), atoms, num, names))
+ {
+ int i;
+ for (i = 0; i < num; ++i)
+ {
+ if (!have_net_atom)
+ have_net_atom = strncmp (names[i], "_NET_", 5) == 0;
+ XFree (names[i]);
+ }
+ }
+ xfree (names);
+ }
+ if (atoms)
+ XFree (atoms);
+
+ FRAME_X_DISPLAY_INFO (f)->have_net_atoms = have_net_atom;
+ }
+
+ if (have_net_atom)
+ {
+ Lisp_Object frame;
+ const char *atom = "_NET_WM_STATE";
+ const char *fs = "_NET_WM_STATE_FULLSCREEN";
+ const char *fw = "_NET_WM_STATE_MAXIMIZED_HORZ";
+ const char *fh = "_NET_WM_STATE_MAXIMIZED_VERT";
+ const char *what = NULL;
+
+ XSETFRAME (frame, f);
+
+ /* If there are _NET_ atoms we assume we have extended window manager
+ hints. */
+ switch (f->want_fullscreen)
+ {
+ case FULLSCREEN_BOTH:
+ what = fs;
+ break;
+ case FULLSCREEN_WIDTH:
+ what = fw;
+ break;
+ case FULLSCREEN_HEIGHT:
+ what = fh;
+ break;
+ }
+
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (0), /* Remove */
+ Fcons
+ (make_unibyte_string (fs,
+ strlen (fs)),
+ Qnil)));
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (0), /* Remove */
+ Fcons
+ (make_unibyte_string (fh,
+ strlen (fh)),
+ Qnil)));
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (0), /* Remove */
+ Fcons
+ (make_unibyte_string (fw,
+ strlen (fw)),
+ Qnil)));
+ f->want_fullscreen = FULLSCREEN_NONE;
+ if (what != NULL)
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (1), /* Add */
+ Fcons
+ (make_unibyte_string (what,
+ strlen (what)),
+ Qnil)));
+ }
+
+ return have_net_atom;
+}
+
+static void
+XTfullscreen_hook (f)
+ FRAME_PTR f;
+{
+ if (f->async_visible)
+ {
+ BLOCK_INPUT;
+ do_ewmh_fullscreen (f);
+ x_sync (f);
+ UNBLOCK_INPUT;
+ }
+}
+
+
/* Check if we need to resize the frame due to a fullscreen request.
If so needed, resize the frame. */
static void
@@ -8346,6 +8459,9 @@ x_check_fullscreen (f)
{
int width, height, ign;
+ if (do_ewmh_fullscreen (f))
+ return;
+
x_real_positions (f, &f->left_pos, &f->top_pos);
x_fullscreen_adjust (f, &width, &height, &ign, &ign);
@@ -8647,13 +8763,12 @@ void
x_raise_frame (f)
struct frame *f;
{
+ BLOCK_INPUT;
if (f->async_visible)
- {
- BLOCK_INPUT;
- XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
- XFlush (FRAME_X_DISPLAY (f));
- UNBLOCK_INPUT;
- }
+ XRaiseWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f));
+
+ XFlush (FRAME_X_DISPLAY (f));
+ UNBLOCK_INPUT;
}
/* Lower frame F. */
@@ -8677,7 +8792,22 @@ XTframe_raise_lower (f, raise_flag)
int raise_flag;
{
if (raise_flag)
- x_raise_frame (f);
+ {
+ Lisp_Object frame;
+ const char *atom = "_NET_ACTIVE_WINDOW";
+
+ x_raise_frame (f);
+ /* See Window Manager Specification/Extended Window Manager Hints at
+ http://freedesktop.org/wiki/Standards_2fwm_2dspec */
+
+ XSETFRAME (frame, f);
+ Fx_send_client_event (frame, make_number (0), frame,
+ make_unibyte_string (atom, strlen (atom)),
+ make_number (32),
+ Fcons (make_number (1),
+ Fcons (make_number (time (NULL) * 1000),
+ Qnil)));
+ }
else
x_lower_frame (f);
}
@@ -11038,6 +11168,7 @@ x_create_terminal (struct x_display_info *dpyinfo)
terminal->mouse_position_hook = XTmouse_position;
terminal->frame_rehighlight_hook = XTframe_rehighlight;
terminal->frame_raise_lower_hook = XTframe_raise_lower;
+ terminal->fullscreen_hook = XTfullscreen_hook;
terminal->set_vertical_scroll_bar_hook = XTset_vertical_scroll_bar;
terminal->condemn_scroll_bars_hook = XTcondemn_scroll_bars;
terminal->redeem_scroll_bar_hook = XTredeem_scroll_bar;
diff --git a/src/xterm.h b/src/xterm.h
index 3c4bdab33c9..1ea50b8158f 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -391,10 +391,12 @@ struct x_display_info
} wm_type;
- /* Atoms that are drag and drop atoms */
- Atom *x_dnd_atoms;
- size_t x_dnd_atoms_size;
- size_t x_dnd_atoms_length;
+ /* Atoms that are drag and drop atoms */
+ Atom *x_dnd_atoms;
+ size_t x_dnd_atoms_size;
+ size_t x_dnd_atoms_length;
+
+ int have_net_atoms;
};
#ifdef HAVE_X_I18N