X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/bc18e09ddf639fbd59e6d2ef238fdaf4e31fb6a3..252c5ee166b0b5dd82aa1976ae01db704c146a2b:/src/ChangeLog diff --git a/src/ChangeLog b/src/ChangeLog index 0d5b41ea20..7f90c576fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,11 +1,296 @@ -2011-07-28 Paul Eggert +2011-08-06 Paul Eggert + + Integer and memory overflow issues. + + * charset.c (charset_table_size) + (struct charset_sort_data.priority): Now ptrdiff_t. + (charset_compare): Don't overflow if priorities differ greatly. + (Fsort_charsets): Don't assume list length fits in int. + Check for size-calculation overflow when allocating sort data. + (syms_of_charset): Allocate an initial charset table that is + just under 64 KiB, to avoid problems with glibc malloc and mmap. + + * cmds.c (internal_self_insert): Check for size-calculation overflow. + + * composite.h (struct composition.glyph_len): Now int, not unsigned. + The actual value is always <= INT_MAX, and leaving it unsigned made + overflow checking harder. + + * dispextern.h (struct glyph_matrix.rows_allocated) + (struct face_cache.size): Now ptrdiff_t, for convenience in use + with xpalloc. The values are still always <= INT_MAX. + + * indent.c (compute_motion): Adjust to region_cache_forward sig change. + + * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls. + (SAFE_NALLOCA): New macro. + + * region-cache.c (struct boundary.pos, find_cache_boundary) + (move_cache_gap, insert_cache_boundary, delete_cache_boundaries) + (set_cache_region, invalidate_region_cache) + (revalidate_region_cache, know_region_cache, region_cache_forward) + (region_cache_backward, pp_cache): + Use ptrdiff_t, not EMACS_INT, since either will do. This is needed + so that ptrdiff_t * can be passed to xpalloc. + (struct region_cache): Similarly, for gap_start, gap_len, cache_len, + beg_unchanged, end_unchanged, buffer_beg, buffer_end members. + (pp_cache): Don't assume cache_len fits in int. + * region-cache.h: Adjust extern decls to match. - * bidi.c: Integer overflow fix. - (bidi_shelve_header_size): New constant. + * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not + EMACS_INT, since either will do, for xpalloc. + + * alloc.c: Include verify.h, and check that int fits in ptrdiff_t. + (xnmalloc, xnrealloc, xpalloc): New functions. + + * bidi.c (bidi_shelve_header_size): New constant. (bidi_cache_ensure_space, bidi_shelve_cache): Use it. (bidi_cache_ensure_space): Avoid integer overflow when allocating. -2011-07-19 Paul Eggert + * buffer.c (overlays_at, overlays_in, record_overlay_string) + (overlay_strings): + Don't update size of array until after memory allocation succeeds, + because xmalloc/xrealloc may not return. + (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help + now that we have proper integer overflow checking. + (record_overlay_string, overlay_strings): Catch overflows when + calculating size of overlay_str_buf. + + * callproc.c (Fcall_process): Check for size overflow when + calculating size of args2. + (child_setup): Avoid overflow by using size_t rather than ptrdiff_t. + Normally we prefer signed values, but sticking with ptrdiff_t would + require adding more-complicated checks. + + * ccl.c (Fccl_execute_on_string): Check for memory overflow. + Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do. + Redo buffer-overflow calculations to avoid integer overflow. + Add a FIXME comment where memory seems to be over-allocated. + + * character.c (Fstring): Check for size-calculation overflow. + + * coding.c (produce_chars): Redo buffer-overflow calculations to avoid + unnecessary integer overflow. Check for size overflow. + (encode_coding_object): Don't update size until xmalloc succeeds. + + * composite.c (get_composition_id): Check for overflow in glyph + length calculations. + + Integer and memory overflow fixes for display code. + * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int. + * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool) + (scrolling_window): Check for overflow in size calculations. + (line_draw_cost, realloc_glyph_pool, add_row_entry): + Don't assume glyph table len fits in int. + (struct row_entry.bucket, row_entry_pool_size, row_entry_idx) + (row_table_size): Now ptrdiff_t, not int. + (scrolling_window): Avoid overflow in size calculations. + Don't update size until allocation succeeds. + * fns.c (concat): Check for overflow in size calculations. + (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT. + * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros. + (NEXT_ALMOST_PRIME_LIMIT): New constant. + + * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int. + (get_doc_string): Check for size calculation overflow. + Don't update size until allocation succeeds. + (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not + EMACS_INT, where ptrdiff_t will do. + (Fsubstitute_command_keys): Check for string overflow. + + * editfns.c (set_time_zone_rule): Don't assume environment length + fits in int. + (message_length): Now ptrdiff_t, not int. + (Fmessage_box): Don't update size until allocation succeeds. + Don't assume message length fits in int. + (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do. + + * emacs.c (main): Do not reallocate argv, since there is a null at + the end that can be overwritten, and this way there's no need to + worry about size-calculation overflow. + (sort_args): Check for size-calculation overflow. + + * eval.c (init_eval_once, grow_specpdl): Don't update size until + alloc succeeds. + (call_debugger, grow_specpdl): Redo calculations to avoid overflow. + + * frame.c (set_menu_bar_lines, x_set_frame_parameters) + (x_set_scroll_bar_width, x_figure_window_size): + Check for integer overflow. + (x_set_alpha): Do not assume XINT fits in int. + + * frame.h (struct frame): Use int, not EMACS_INT, where int works. + This is for the members text_lines, text_cols, total_lines, total_cols, + where the system imposes an 'int' limit. + + * fringe.c (Fdefine_fringe_bitmap): + Don't update size until alloc works. + + * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring) + (ftfont_shape_by_flt): Check for integer overflow in size calculations. + + * gtkutil.c (get_utf8_string, xg_store_widget_in_map): + Check for size-calculation overflow. + (get_utf8_string): Use ptrdiff_t, not size_t, where either will + do, as we prefer signed integers. + (id_to_widget.max_size, id_to_widget.used) + (xg_store_widget_in_map, xg_remove_widget_from_map) + (xg_get_widget_from_map, xg_get_scroll_id_for_window) + (xg_remove_scroll_bar, xg_update_scrollbar_pos): + Use and return ptrdiff_t, not int. + (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int. + * gtkutil.h: Change prototypes to match the above. + + * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these + are duplicate now that they've been promoted to lisp.h. + (x_allocate_bitmap_record, x_alloc_image_color) + (make_image_cache, cache_image, xpm_load): + Don't update size until alloc is done. + (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors) + (x_detect_edges): + Check for size calculation overflow. + (ct_colors_allocated_max): New constant. + (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid + overflow. + + * keyboard.c (read_char, menu_bar_items, tool_bar_items) + (read_char_x_menu_prompt, read_char_minibuf_menu_width) + (read_char_minibuf_menu_prompt, follow_key, read_key_sequence): + Use ptrdiff_t, not int, to count maps. + (read_char_minibuf_menu_prompt): Check for overflow in size + calculations. Don't update size until allocation succeeds. Redo + calculations to avoid overflow. + * keyboard.h: Change prototypes to match the above. + + * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int, + to count maps. + (current_minor_maps): Check for size calculation overflow. + * keymap.h: Change prototypes to match the above. + + * lread.c (read1, init_obarray): Don't update size until alloc done. + + * macros.c (Fstart_kbd_macro): Don't update size until alloc done. + (store_kbd_macro_char): Reorder multiplicands to avoid overflow. + + * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail): + Now ptrdiff_t, not int. + * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes. + (ns_draw_fringe_bitmap): Rewrite to avoid overflow. + + * process.c (Fnetwork_interface_list): Check for overflow + in size calculation. + + * region-cache.c (move_cache_gap): Check for size calculation overflow. + + * scroll.c (do_line_insertion_deletion_costs): Check for size calc + overflow. Don't bother calling xmalloc when xrealloc will do. + + * search.c (Freplace_match): Check for size calculation overflow. + (Fset_match_data): Don't assume list lengths fit in 'int'. + + * sysdep.c (system_process_attributes): Use ptrdiff_t, not int, + for command line length. Do not attempt to address one before the + beginning of an array, as that's not portable. + + * term.c (max_frame_lines): Remove; unused. + (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t, + not int. + (encode_terminal_code, calculate_costs): Check for size + calculation overflow. + (encode_terminal_code): Use ptrdiff_t, not int, to record glyph + table lengths and related sizes. Don't update size until alloc + done. Redo calculations to avoid overflow. + (calculate_costs): Don't bother calling xmalloc when xrealloc will do. + + * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of + subtracting pointers. + (gobble_line): Check for overflow more carefully. Don't update size + until alloc done. + + * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes. + Don't update size until alloc done. + Redo size calculations to avoid overflow. + Check for size calculation overflow. + (main) [DEBUG]: Fix typo in invoking tparam1. + + * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title): + Use ptrdiff_t, not int, for sizes. + (store_mode_line_noprop_char): Don't update size until alloc done. + + * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face): + Use ptrdiff_t, not int, for sizes. + (Finternal_make_lisp_face, cache_face): + Check for size calculation overflow. + (cache_face): Treat size calculation overflows as if they were + memory exhaustion (the usual treatment), rather than aborting. + + * xfns.c (x_encode_text, x_set_name_internal) + (Fx_change_window_property): Use ptrdiff_t, not int, to count + sizes, since they can exceed INT_MAX in size. Check for size + calculation overflow. + + * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc. + (xg_select): Check for size calculation overflow. + Don't update size until alloc done. + + * xrdb.c (get_environ_db): Don't assume path length fits in int, + as sprintf is limited to int lengths. + + * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX) + (X_LONG_MIN): New macros. + Use them to make the following changes clearer. + (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer. + This change doesn't affect the value now, but it may help remind + future maintainers not to raise the value too much later. + (SELECTION_QUANTUM): Remove, replacing with ... + (selection_quantum): ... new function, which avoids overflow. + All uses changed. + (struct selection_data.size): Now ptrdiff_t, not int, to avoid + assumption that selection length fits in 'int'. + (x_reply_selection_request, x_handle_selection_request) + (x_get_window_property, receive_incremental_selection) + (x_get_window_property_as_lisp_data, selection_data_to_lisp_data) + (lisp_data_to_selection_data, clean_local_selection_data): + Use ptrdiff_t, not int, to record length of selection. + (x_reply_selection_request, x_get_window_property) + (receive_incremental_selection, x_property_data_to_lisp): + Redo calculations to avoid overflow. + (x_reply_selection_request): When sending hint, ceiling it at + X_LONG_MAX rather than relying on wraparound overflow to send + something. + (x_get_window_property, receive_incremental_selection) + (lisp_data_to_selection_data, x_property_data_to_lisp): + Check for size-calculation overflow. + (x_get_window_property, receive_incremental_selection) + (lisp_data_to_selection_data, Fx_register_dnd_atom): + Don't store size until memory allocation succeeds. + (x_get_window_property): Plug memory leak on memory exhaustion. + Don't double-block input; malloc is safe here. Don't assume 2**34 + - 4 fits in unsigned long. Add an xassert to check + XGetWindowProperty overflow. Be more careful about overflow + calculations, and distinguish size from memory overflow better. + (receive_incremental_selection): When tracing, don't assume + unsigned int is less than INT_MAX. + (x_selection_data_to_lisp_data): Remove unnecessary (and in theory + harmful) conversions of unsigned short to int. + (lisp_data_to_selection_data): Don't assume that integers + in the range -65535 through -1 fit in an X unsigned short. + Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into + result parameters unless successful. Rely on cons_to_unsigned + to report problems with elements; the old code wasn't right anyway. + (x_check_property_data): Check for int overflow; we cannot use + a wider type due to X limits. + (x_handle_dnd_message): Use unsigned int, to avoid int overflow. + + * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow. + + * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent) + (x_term_init): Check for size calculation overflow. + (x_color_cells): Don't store size until memory allocation succeeds. + (handle_one_xevent): Use ptrdiff_t, not int, for byte counts. + Don't assume alloca size is less than MAX_ALLOCA. + (x_term_init): Don't assume length fits in int (sprintf is limited + to int size). Use ptrdiff_t for composition IDs. * character.c (lisp_string_width): @@ -124,7 +409,195 @@ (gs_load): Use printmax_t to print the widest integers possible. Check for integer overflow when computing image height and width. -2011-07-19 Paul Eggert +2011-08-05 Eli Zaretskii + + * bidi.c : Now static. + (bidi_initialize): Initialize bidi_cache_total_alloc. + + *xdisp.c (display_line): Release buffer allocated for shelved bidi + cache. (Bug#9221) + + * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total + amount allocated this far in `bidi_cache_total_alloc'. + (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if + non-zero, only free the data buffer without restoring the cache + contents. All callers changed. + + * dispextern.h (bidi_unshelve_cache): Update prototype. + + * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to) + (move_it_in_display_line, move_it_to) + (move_it_vertically_backward, move_it_by_lines): Replace the call + to xfree to an equivalent call to bidi_unshelve_cache. + (move_it_in_display_line_to): Fix logic of returning + MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224) + +2011-08-05 Eli Zaretskii + + * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that + came from a string character with a `cursor' property. (Bug#9229) + +2011-08-04 Jan Djärv + + * Makefile.in (LIB_PTHREAD): New variable. + (LIBES): Add LIB_PTHREAD (Bug#9216). + + * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h: + Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216). + +2011-08-04 Andreas Schwab + + * regex.c (re_iswctype): Remove some redundant boolean + conversions. + +2011-08-04 Jan Djärv + + * xterm.c (x_find_topmost_parent): New function. + (x_set_frame_alpha): Find topmost parent window with + x_find_topmost_parent and set the property there also (bug#9181). + (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify. + +2011-08-04 Paul Eggert + + * callproc.c (Fcall_process): Avoid vfork clobbering + the local vars buffer, coding_systems, current_dir. + +2011-08-03 Stefan Monnier + + * keymap.c (Fmake_composed_keymap): Move to subr.el. + +2011-08-03 Paul Eggert + + * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE + so that it is not optimized away. + + * xdisp.c (compute_display_string_pos): Remove unused local. + +2011-08-02 Eli Zaretskii + + Fix slow cursor motion and scrolling in large buffers with + selective display, like Org Mode buffers. (Bug#9218) + + * dispextern.h (struct bidi_it): New member disp_prop_p. + + * xdisp.c: Remove one-slot cache of display string positions. + (compute_display_string_pos): Accept an additional argument + DISP_PROP_P; callers changed. Scan at most 5K characters forward + for a display string or property. If found, set DISP_PROP_P + non-zero. + + * bidi.c (bidi_fetch_char): Accept an additional argument + DISP_PROP_P, and pass it to compute_display_string_pos. + Only handle text covered by a display string if DISP_PROP_P is returned + non-zero. All callers of bidi_fetch_char changed. + +2011-08-02 Stefan Monnier + + * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE. + +2010-12-03 Don March + + * keymap.c (Fdefine_key): Fix non-prefix key error message when + last character M-[char] is translated to ESC [char] (bug#7541). + +2011-08-02 Kenichi Handa + + * lisp.h (uniprop_table): Extern it. + + * chartab.c (uniprop_table): Make it non-static. + +2011-08-01 Eli Zaretskii + + * xdisp.c (forward_to_next_line_start): Accept additional argument + BIDI_IT_PREV, and store into it the state of the bidi iterator had + on the newline. + (reseat_at_next_visible_line_start): Use the bidi iterator state + returned by forward_to_next_line_start to restore the state of + it->bidi_it after backing up to previous newline. (Bug#9212) + +2011-07-30 Andreas Schwab + + * regex.c (re_comp): Protoize. + (re_exec): Fix return type. + (regexec): Fix type of `ret'. (Bug#9203) + +2011-07-29 Paul Eggert + + * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189). + This is needed if max-image-size is a floating-point number. + +2011-07-28 Andreas Schwab + + * print.c (print_object): Print empty symbol as ##. + + * lread.c (read1): Read ## as empty symbol. + +2011-07-28 Alp Aker + + * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when + setting frame foreground color (Bug#9175). + (x_set_background_color): Likewise. + + * nsmenu.m (-setText): Size tooltip dimensions precisely to + contents (Bug#9176). + (EmacsTooltip -init): Remove bezels and add shadows to + tooltip windows. + + * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe + or scroll bar (Bug#8470). + + * nsfont.m (nsfont_open): Remove assignment to voffset and + unnecessary vars hshink, expand, hd, full_height, min_height. + (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913). + + * nsterm.h (nsfont_info): Remove voffset field. + +2011-07-28 Alp Aker + + Implement strike-through and overline on NextStep (Bug#8863). + + * nsfont.m (nsfont_open): Use underline position provided by font, + instead of hard-coded value of 2. + (nsfont_draw): Call ns_draw_text_decoration instead. + + * nsterm.h: Add declaration for ns_draw_text_decoration. + + * nsterm.m (ns_draw_text_decoration): New function for drawing + underline, overline, and strike-through. + (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to + ns_draw_text_decoration. Change treatment of cursor drawing to + accomodate underlining, etc. + +2011-07-28 Eli Zaretskii + + * buffer.c (init_buffer_once): Set bidi-display-reordering to t by + default. + +2011-07-28 Paul Eggert + + * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race. + Without this fix, if a signal arrives just after memory fills up, + 'malloc' might be invoked reentrantly. + + * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1. + In other words, assume that every image size is allowed, on non-X + hosts. This assumption is probably wrong, but it lets Emacs compile. + +2011-07-28 Andreas Schwab + + * regex.c (re_iswctype): Convert return values to boolean. + +2011-07-28 Eli Zaretskii + + * xdisp.c (compute_display_string_pos): Don't use cached display + string position if the buffer had its restriction changed. + (Bug#9184) + +2011-07-28 Paul Eggert + + * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering. + +2011-07-28 Paul Eggert Integer signedness and overflow and related fixes. (Bug#9079) @@ -323,6 +796,101 @@ Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally well either way, and we prefer signed to unsigned. +2011-07-27 Lars Magne Ingebrigtsen + + * gnutls.c (emacs_gnutls_read): Don't message anything if the peer + closes the connection while we're reading (bug#9182). + +2011-07-25 Jan Djärv + + * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons + are specified (Bug#9168). + +2011-07-25 Paul Eggert + + * bidi.c (bidi_dump_cached_states): Fix printf format mismatch. + Found by GCC static checking and --with-wide-int on a 32-bit host. + +2011-07-25 Eli Zaretskii + + * xdisp.c (compute_display_string_pos): Fix logic of caching + previous display string position. Initialize cached_prev_pos to + -1. Fixes slow-down at the beginning of a buffer. + +2011-07-24 Eli Zaretskii + + * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil' + for attrs[LFACE_FONTSET_INDEX]. + +2011-07-23 Paul Eggert + + * xml.c (parse_region): Remove unused local + that was recently introduced. + +2011-07-23 Eli Zaretskii + + * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in + 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca. + + * xdisp.c (move_it_in_display_line_to): Record the best matching + position for TO_CHARPOS while scanning the line, and restore it on + exit if none of the characters scanned was an exact match. + Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay + when exact match is impossible due to invisible text, and the + lines are truncated. + +2011-07-23 Jan Djärv + + * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask + for OSX >= 10.7. + +2011-07-22 Eli Zaretskii + + Fix a significant slow-down of cursor motion with C-n, C-p, + C-f/C-b, and C-v/M-v that couldn't keep up with keyboard + auto-repeat under bidi redisplay in fontified buffers. + * xdisp.c (compute_stop_pos_backwards): New function. + (next_element_from_buffer): Call compute_stop_pos_backwards to + find a suitable prev_stop when we find ourselves before + base_level_stop. + (reseat): Don't look for prev_stop, as that could mean a very long + run. + + : Cache for last found display string + position. + (compute_display_string_pos): Return the cached position if asked + about the same buffer in the same area of character positions, and + the buffer wasn't changed since the time the display string + position was cached. + +2011-07-22 Eli Zaretskii + + * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object + is an integer, which is important for empty lines. (Bug#9149) + +2011-07-22 Chong Yidong + + * frame.c (Fmodify_frame_parameters): In tty case, update the + default face if necessary (Bug#4238). + +2011-07-21 Chong Yidong + + * editfns.c (Fstring_to_char): No need to explain what a character + is in the docstring (Bug#6576). + +2011-07-20 Lars Magne Ingebrigtsen + + * xml.c (parse_region): Make sure we always return a tree. + +2011-07-20 HAMANO Kiyoto + + * xml.c (parse_region): If a document contains only comments, + return that, too. + +2011-07-20 Lars Magne Ingebrigtsen + + * xml.c (make_dom): Return comments, too. + 2011-07-19 Paul Eggert Port to OpenBSD. @@ -452,8 +1020,8 @@ (reseat_to_string): Initialize bidi_it->string.s and bidi_it->string.schars. (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to - NULL (avoids a crash in bidi_paragraph_init). Initialize - itb.string.lstring. + NULL (avoids a crash in bidi_paragraph_init). + Initialize itb.string.lstring. (init_iterator): Call bidi_init_it only of a valid buffer position was specified. Initialize paragraph_embedding to L2R. @@ -469,12 +1037,12 @@ (init_iterator, reseat_1, reseat_to_string): Initialize the string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS when iterating on a string not from display properties). - (compute_display_string_pos, compute_display_string_end): Fix - calculation of the object to scan. Fixes an error when using + (compute_display_string_pos, compute_display_string_end): + Fix calculation of the object to scan. Fixes an error when using arrow keys. (next_element_from_buffer): Don't abort when IT_CHARPOS is before - base_level_stop; instead, set base_level_stop to BEGV. Fixes - crashes in vertical-motion. + base_level_stop; instead, set base_level_stop to BEGV. + Fixes crashes in vertical-motion. (next_element_from_buffer): Improve commentary for when the iterator is before prev_stop. (init_iterator): Initialize bidi_p from the default value of @@ -487,8 +1055,8 @@ (next_element_from_string): Support bidi reordering of Lisp strings. (handle_stop_backwards): Support Lisp strings as well. - (display_string): Support display of R2L glyph rows. Use - IT_STRING_CHARPOS when displaying from a Lisp string. + (display_string): Support display of R2L glyph rows. + Use IT_STRING_CHARPOS when displaying from a Lisp string. (init_iterator): Don't initialize it->bidi_p for strings here. (reseat_to_string): Initialize it->bidi_p for strings here. @@ -570,8 +1138,8 @@ displayed in margins. (Bug#8133) (Bug#8867) Return MOVE_POS_MATCH_OR_ZV only if iterator position is past TO_CHARPOS. - (pos_visible_p): Support positions in bidi-reordered lines. Save - and restore bidi cache. + (pos_visible_p): Support positions in bidi-reordered lines. + Save and restore bidi cache. * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int. (bidi_paragraph_info): Delete unused struct. @@ -591,8 +1159,8 @@ `len' according to what STRING_CHAR_AND_LENGTH expects. (bidi_paragraph_init, bidi_resolve_explicit_1) (bidi_resolve_explicit, bidi_resolve_weak) - (bidi_level_of_next_char, bidi_move_to_visually_next): Support - iteration over a string. + (bidi_level_of_next_char, bidi_move_to_visually_next): + Support iteration over a string. (bidi_set_sor_type, bidi_resolve_explicit_1) (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit can now be zero (for strings); special values 0 and -1 were @@ -623,20 +1191,20 @@ (bidi_cache_fetch_state, bidi_cache_search) (bidi_cache_find_level_change, bidi_cache_ensure_space) (bidi_cache_iterator_state, bidi_cache_find) - (bidi_find_other_level_edge, bidi_cache_start_stack): All - variables related to cache indices are now EMACS_INT. + (bidi_find_other_level_edge, bidi_cache_start_stack): + All variables related to cache indices are now EMACS_INT. * dispextern.h (struct bidi_string_data): New structure. (struct bidi_it): New member `string'. Make flag members be 1-bit fields, and put them last in the struct. - (compute_display_string_pos, compute_display_string_end): Update - prototypes. + (compute_display_string_pos, compute_display_string_end): + Update prototypes. (bidi_push_it, bidi_pop_it): Add prototypes. (struct iterator_stack_entry): New members bidi_p, paragraph_embedding, and from_disp_prop_p. (struct it): Member bidi_p is now a bit field 1 bit wide. - (bidi_shelve_cache, bidi_unshelve_cache): Declare - prototypes. + (bidi_shelve_cache, bidi_unshelve_cache): + Declare prototypes. * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector) (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors @@ -918,7 +1486,7 @@ (char_table_set_range): Adjuted for the above change. (map_sub_char_table): Delete args default_val and parent. Add arg top. Give decoded values to a Lisp function. - (map_char_table): Adjusted for the above change. Give decoded + (map_char_table): Adjust for the above change. Give decoded values to a Lisp function. Gcpro more variables. (uniprop_table_uncompress) (uniprop_decode_value_run_length): New functions. @@ -935,10 +1503,10 @@ and Sput_unicode_property_internal. Defvar_lisp char-code-property-alist. - * composite.c (CHAR_COMPOSABLE_P): Adjusted for the change of + * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of Vunicode_category_table. - * font.c (font_range): Adjusted for the change of + * font.c (font_range): Adjust for the change of Vunicode_category_table. 2011-07-07 Dan Nicolaescu @@ -967,14 +1535,14 @@ (store_monospaced_changed): Add comment. Call dpyinfo_valid. (struct xsettings): Move font inside HAVE_XFT. (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines. - (GSETTINGS_MONO_FONT): Renamed from SYSTEM_MONO_FONT. + (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT. - (something_changed_gsettingsCB): Renamed from something_changedCB. + (something_changed_gsettingsCB): Rename from something_changedCB. Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME also. (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines. - (GCONF_MONO_FONT): Renamed from SYSTEM_MONO_FONT. Move inside HAVE_XFT. - (something_changed_gconfCB): Renamed from something_changedCB. + (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT. + (something_changed_gconfCB): Rename from something_changedCB. Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also. (parse_settings): Move check for font inside HAVE_XFT. (read_settings, apply_xft_settings): Add comment. @@ -987,8 +1555,8 @@ (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT. (xsettings_initialize): Call init_gsettings last. - (xsettings_get_system_font, xsettings_get_system_normal_font): Add - comment. + (xsettings_get_system_font, xsettings_get_system_normal_font): + Add comment. 2011-07-05 Paul Eggert @@ -1171,7 +1739,7 @@ (syms_of_xsettings): Initialize gsettings_client, gsettings_obj to NULL. - * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Renamed from + * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from GCONF_CFLAGS/LIBS. 2011-06-29 Martin Rudalics @@ -1918,7 +2486,7 @@ * character.c, coding.c, doprnt.c, editfns.c, eval.c: All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND. - * lisp.h (STRING_BYTES_BOUND): Renamed from STRING_BYTES_MAX. + * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX. * character.c (string_escape_byte8): Fix nbytes/nchars typo. @@ -2027,8 +2595,8 @@ Qclone_number. Remove external declaration of Qdelete_window. (Fbuffer_list): Rewrite doc-string. Minor restructuring of code. - (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer): Run - Qbuffer_list_update_hook if allowed. + (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer): + Run Qbuffer_list_update_hook if allowed. (Fother_buffer): Rewrite doc-string. Major rewrite for new buffer list implementation. (other_buffer_safely): New function. @@ -2039,8 +2607,8 @@ (record_buffer): Inhibit quitting and rewrite using quittable functions. Run Qbuffer_list_update_hook if allowed. (Frecord_buffer, Funrecord_buffer): New functions. - (switch_to_buffer_1, Fswitch_to_buffer): Remove. Move - switch-to-buffer to window.el. + (switch_to_buffer_1, Fswitch_to_buffer): Remove. + Move switch-to-buffer to window.el. (bury-buffer): Move to window.el. (Vbuffer_list_update_hook): New variable. @@ -2068,8 +2636,8 @@ (select_window_norecord, select_frame_norecord): Move in front of run_window_configuration_change_hook. Remove now obsolete declarations. - (Fset_window_buffer): Rewrite doc-string. Call - Qrecord_window_buffer. + (Fset_window_buffer): Rewrite doc-string. + Call Qrecord_window_buffer. (keys_of_window): Move binding for other-window to window.el. 2011-06-11 Chong Yidong @@ -2151,8 +2719,8 @@ orig_total_lines. (Fdelete_window, delete_window): Remove. Window deletion is handled by window.el. - (window_loop): Remove DELETE_OTHER_WINDOWS case. Replace - Fdelete_window calls with calls to Qdelete_window. + (window_loop): Remove DELETE_OTHER_WINDOWS case. + Replace Fdelete_window calls with calls to Qdelete_window. (Fdelete_other_windows): Remove. Deleting other windows is handled by window.el. (window_fixed_size_p): Remove. Fixed-sizeness of windows is @@ -2175,8 +2743,8 @@ (grow_mini_window, shrink_mini_window): Implement by calling Qresize_root_window_vertically, resize_window_check and resize_window_apply. - (saved_window, Fset_window_configuration, save_window_save): Do - not handle orig_top_line, orig_total_lines, and + (saved_window, Fset_window_configuration, save_window_save): + Do not handle orig_top_line, orig_total_lines, and resize_proportionally. (window_min_height, window_min_width): Move to window.el. (keys_of_window): Move bindings for delete-other-windows, @@ -2196,8 +2764,8 @@ * xdisp.c (init_xdisp): Don't use set_window_height but set heights directly. - * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Use - resize_frame_windows instead of change_window_heights and run + * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): + Use resize_frame_windows instead of change_window_heights and run run_window_configuration_change_hook. * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows @@ -2219,8 +2787,8 @@ (Frun_window_configuration_change_hook, make_parent_window) (resize_window_check, resize_window_apply, Fresize_window_apply) (resize_frame_windows, Fsplit_window_internal) - (Fdelete_window_internal, Fresize_mini_window_internal): New - functions. + (Fdelete_window_internal, Fresize_mini_window_internal): + New functions. (syms_of_window): New variables Vwindow_splits and Vwindow_nest. 2011-06-08 Martin Rudalics @@ -2240,8 +2808,8 @@ (Fwindow_nest, Fset_window_nest, Fwindow_new_total) (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers) (Fset_window_prev_buffers, Fwindow_next_buffers) - (Fset_window_next_buffers, Fset_window_clone_number): New - functions. + (Fset_window_next_buffers, Fset_window_clone_number): + New functions. (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start) (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p): Doc-string fixes. @@ -2267,10 +2835,10 @@ (Fwindow_top_line, window_body_lines, Fwindow_body_size) (Fwindow_list_1): New functions. (window_box_text_cols): Replace with window_body_cols. - (Fwindow_width, Fscroll_left, Fscroll_right): Use - window_body_cols instead of window_box_text_cols. - (delete_window, Fset_window_configuration): Call - delete_all_subwindows with window as argument. + (Fwindow_width, Fscroll_left, Fscroll_right): + Use window_body_cols instead of window_box_text_cols. + (delete_window, Fset_window_configuration): + Call delete_all_subwindows with window as argument. (delete_all_subwindows): Take a window as argument and not a structure. Rewrite. (window_loop): Remove handling of GET_LRU_WINDOW and @@ -2281,8 +2849,8 @@ window_box_text_cols. delete_all_subwindows now takes a Lisp_Object as argument. - * indent.c (compute_motion, Fcompute_motion): Use - window_body_cols instead of window_box_text_cols. + * indent.c (compute_motion, Fcompute_motion): + Use window_body_cols instead of window_box_text_cols. * frame.c (delete_frame): Call delete_all_subwindows with root window as argument.