* font.c (font_unparse_xlfd): Don't blindly alloca long strings.
[bpt/emacs.git] / src / ChangeLog
index b525d83..f94f9c4 100644 (file)
@@ -1,6 +1,69 @@
-2011-08-05  Paul Eggert  <eggert@cs.ucla.edu>
-
-       Integer and memory overflow issues.
+2011-08-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       sprintf-related integer and memory overflow issues.
+
+       * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
+       (esprintf, esnprintf, exprintf, evxprintf): New functions.
+       * keyboard.c (command_loop_level): Now EMACS_INT, not int.
+       (cmd_error): kbd macro iterations count is now EMACS_INT, not int.
+       (modify_event_symbol): Do not assume that the length of
+       name_alist_or_stem is safe to alloca and fits in int.
+       (Fexecute_extended_command): Likewise for function name and binding.
+       (Frecursion_depth): Wrap around reliably on integer overflow.
+       * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
+       since some callers pass EMACS_INT values.
+       (Fsingle_key_description): Don't crash if symbol name contains more
+       than MAX_ALLOCA bytes.
+       * minibuf.c (minibuf_level): Now EMACS_INT, not int.
+       (get_minibuffer): Arg is now EMACS_INT, not int.
+       * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
+       (esprintf, esnprintf, exprintf, evxprintf): New decls.
+       * window.h (command_loop_level, minibuf_level): Reflect API changes.
+
+       * dbusbind.c (xd_signature, Fdbus_register_signal):
+       Do not overrun buffer; instead, report string overflow.
+
+       * dispnew.c (add_window_display_history): Don't overrun buffer.
+       Truncate instead; this is OK since it's just a log.
+
+       * editfns.c (Fcurrent_time_zone): Don't overrun buffer
+       even if the time zone offset is outlandishly large.
+       Don't mishandle offset == INT_MIN.
+
+       * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
+       when creating daemon; the previous buffer-overflow check was incorrect.
+
+       * eval.c (verror): Simplify by rewriting in terms of evxprintf,
+       which has the guts of the old verror function.
+
+       * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
+       use SAFE_ALLOCA instead.  Use esprintf to avoid int-overflow issues.
+
+       * font.c (font_unparse_xlfd): Don't blindly alloca long strings.
+       Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
+       fits in int, when using sprintf.  Use single snprintf to count
+       length of string rather than counting it via multiple sprintfs;
+       that's simpler and more reliable.
+       (APPEND_SPRINTF): New macro.
+       (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
+       (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
+       sprintf, in case result does not fit in int.
+
+2011-08-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       Integer and memory overflow issues (Bug#9196).
+
+       * doc.c (get_doc_string): Rework so that
+       get_doc_string_buffer_size is the actual buffer size, rather than
+       being 1 less than the actual buffer size; this makes xpalloc more
+       convenient.
+
+       * image.c (x_allocate_bitmap_record, cache_image):
+       * xselect.c (Fx_register_dnd_atom):
+       Simplify previous changes by using xpalloc.
+
+       * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
+       since either will do and ptrdiff_t is convenient with xpalloc.
 
        * charset.c (charset_table_size)
        (struct charset_sort_data.priority): Now ptrdiff_t.
        (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
        (bidi_cache_ensure_space): Avoid integer overflow when allocating.
 
+       * bidi.c (bidi_cache_shrink):
        * buffer.c (overlays_at, overlays_in, record_overlay_string)
        (overlay_strings):
        Don't update size of array until after memory allocation succeeds,
        * 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_USHRT_MAX, X_ULONG_MAX): New macros.
+       * 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
        (receive_incremental_selection, x_property_data_to_lisp):
        Redo calculations to avoid overflow.
        (x_reply_selection_request): When sending hint, ceiling it at
-       X_ULONG_MAX rather than relying on wraparound overflow to send
+       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):
        (gs_load): Use printmax_t to print the widest integers possible.
        Check for integer overflow when computing image height and width.
 
+2011-08-26  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (redisplay_window): Don't force window start if point
+       will be invisible in the resulting window.  (Bug#9324)
+
+2011-08-25  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
+       the display spec is of the form `(space ...)'.
+       (handle_display_spec): Return the value returned by
+       handle_single_display_spec, not just 1 or zero.
+       (handle_single_display_spec): If the display spec is of the form
+       `(space ...)', and specifies display in the text area, return 2
+       rather than 1.
+       (try_cursor_movement): Check for the need to scroll more
+       accurately, and prefer exact match for point under bidi.  Don't
+       advance `row' beyond the last row of the window.
+
+       * dispextern.h (struct bidi_it): Rename the disp_prop_p member
+       into disp_prop; all users changed.
+
+       * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
+       DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
+       for the text covered by the display property.
+
+2011-08-25  Chong Yidong  <cyd@stupidchicken.com>
+
+       * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
+       Change return value to nil.
+       (Frecord_buffer): Delete unused function.
+
+2011-08-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
+       buffers, return left-to-right.
+       (set_cursor_from_row): Consider candidate row a win if its glyph
+       represents a newline and point is on that newline.  Fixes cursor
+       positioning on the newline at EOL of R2L text within L2R
+       paragraph, and vice versa.
+       (try_cursor_movement): Check continued rows, in addition to
+       continuation rows.  Fixes unwarranted scroll when point enters a
+       continued line of R2L text within an L2R paragraph, or vice versa.
+       (cursor_row_p): Consider the case of point being equal to
+       MATRIX_ROW_END_CHARPOS.  Prevents cursor being stuck when moving
+       from the end of a short line to the beginning of a continued line
+       of R2L text within L2R paragraph.
+       (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
+       composed characters.
+
+       * bidi.c (bidi_check_type): Use xassert.
+       (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
+       members.
+
+2011-08-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
+       a character.
+
+2011-08-23  Chong Yidong  <cyd@stupidchicken.com>
+
+       * nsfont.m (ns_otf_to_script): Fix typo.
+
+2011-08-22  Kenichi Handa  <handa@m17n.org>
+
+       * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
+       extra slot even if the purpose is char-code-property-table.
+
+2011-08-23  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (redisplay_window): When computing centering_position,
+       account for the height of the header line.  (Bug#8874)
+
+       * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
+       instead of CHAR_TO_BYTE.  Fixes a crash when a completion
+       candidate is selected by the mouse, and that candidate has a
+       composed character under the mouse.
+
+       * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1.  Fixes pixel
+       coordinates reported by pos-visible-in-window-p for a composed
+       character in column zero.
+
+2011-08-23  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
+
+2011-08-22  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
+       consider it a hit if to_charpos is anywhere in the range of the
+       composed buffer positions.
+
+2011-08-22  Chong Yidong  <cyd@stupidchicken.com>
+
+       * image.c (gif_load): Don't assume that each subimage has the same
+       dimensions as the base image.  Handle disposal method that is
+       "undefined" by the gif spec (Bug#9335).
+
+2011-08-20  Chong Yidong  <cyd@stupidchicken.com>
+
+       * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
+       (Fcondition_case): Document `debug' symbol in error handler.
+
+2011-08-19  Eli Zaretskii  <eliz@gnu.org>
+
+       * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
+       face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
+       from an Org mode buffer to a Speedbar frame.
+
+       * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
+       a composition, take its buffer position from IT->cmp_it.charpos.
+       Fixes cursor positioning at the beginning of a line that begins
+       with a composed character.
+
+2011-08-18  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
+       character bidirectional type, use STRONG_L instead.  Fixes crashes
+       in a buffer produced by `describe-categories'.
+
+       * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
+       members before the level stack, so they would be saved and
+       restored when copying iterator state.  Fixes incorrect reordering
+       around TABs covered by display properties.
+
+2011-08-18  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * process.c (Fnetwork_interface_list): Correctly determine buffer
+       size.
+
+2011-08-17  Chong Yidong  <cyd@stupidchicken.com>
+
+       * eval.c (internal_condition_case, internal_condition_case_1)
+       (internal_condition_case_2, internal_condition_case_n):
+       Remove unnecessary aborts (Bug#9081).
+
+2011-08-17  Eli Zaretskii  <eliz@gnu.org>
+
+       * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
+       has no `load' handler, try opening the file locally.  (Bug#9311)
+
+2011-08-16  Ken Brown  <kbrown@cornell.edu>
+
+       * gmalloc.c: Expand comment.
+
+2011-08-16  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
+       if it fails the cursor_row_p test.  Fixes cursor positioning at ZV.
+
+2011-08-16  Ken Brown  <kbrown@cornell.edu>
+
+       Fix memory allocation problems in Cygwin build (Bug#9273).
+
+       * unexcw.c ( __malloc_initialized): Declare external variable.
+       (fixup_executable): Force the dumped emacs to reinitialize malloc.
+
+       * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
+       New variables.
+       (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
+       dumped emacs.
+       (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
+       in the static heap.
+       [CYGWIN] (special_realloc): New function.
+       (_realloc_internal_nolock) [CYGWIN]: Use the new function on
+       requests to realloc storage in the static heap.
+
+2011-08-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * bidi.c (bidi_initialize): Remove unused local.
+
+2011-08-15  Eli Zaretskii  <eliz@gnu.org>
+
+       * biditype.h: File removed.
+
+       * bidimirror.h: File removed.
+
+       * deps.mk (bidi.o): Remove biditype.h and
+       bidimirror.h.
+
+       * makefile.w32-in ($(BLD)/bidi.$(O)): Remove biditype.h and
+       bidimirror.h.
+
+       * dispextern.h: Fix a typo in the comment to bidi_type_t.
+
+       * chartab.c: Improve commentary for the uniprop_table API.
+
+       * bidi.c (bidi_paragraph_init): Support zero value of
+       bidi_ignore_explicit_marks_for_paragraph_level.
+       (bidi_initialize): Use uniprop_table instead of including
+       biditype.h and bidimirror.h.
+
+       * xdisp.c (move_it_in_display_line_to): Don't reset pixel
+       coordinates of the iterator when restoring from ppos_it.
+       (Bug#9296)
+
+2011-08-14  Kenichi Handa  <handa@m17n.org>
+
+       * process.c (create_process): Call setup_process_coding_systems
+       after the pid of the process is set to -1 (Bug#8162).
+
+2011-08-14  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (move_it_in_display_line_to): Don't invoke
+       IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
+       ppos_it.  Fixes vertical cursor motion when line beginning is
+       covered by an image.  (Bug#9296)
+
+2011-08-14  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * nsterm.h (ns_run_ascript): Declare.
+       (NSAPP_DATA2_RUNASSCRIPT): Define.
+
+       * nsfns.m (as_script, as_result, as_status): New static variables.
+       (ns_run_ascript): New function.
+       (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
+       event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
+       the event loop.  Get status from as_status (Bug#7276).
+
+       * nsterm.m (sendEvent): If event is NSApplicationDefined and
+       data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
+       the event loop (Bug#7276).
+
+2011-08-14  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * gnutls.c (QCgnutls_bootprop_priority)
+       (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
+       (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
+       (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
+       (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
+       (QCgnutls_bootprop_verify_hostname_error)
+       (QCgnutls_bootprop_callbacks_verify): Rename from
+       Qgnutls_bootprop_..., all uses changed.
+
+       * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
+       uses changed.
+
+2011-08-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * xfaces.c (Qframe_set_background_mode): Now static.
+       * dispextern.h (Qframe_set_background_mode): Remove decl.
+
+       * process.c (Fnetwork_interface_info): Declare local only if needed.
+
+2011-08-13  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
+       (Fnetwork_interface_list): Allocate in increments of bytes instead
+       of sizeof (struct ifreq).  Iterate over ifconf.ifc_req by counting
+       bytes (Bug#8477).  Count bytes correctly when ifr_addr is a struct
+       sockaddr.
+       (struct ifflag_def): notrailers is smart on OSX.
+       (Fnetwork_interface_info): Handle case when ifr_flags is negative.
+       Get hardware address with getifaddrs if available.
+
+2011-08-12  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (iterate_out_of_display_property): xassert that
+       IT->position is set to within IT->object's boundaries.  Break from
+       the loop as soon as EOB is reached; avoids infloops in redisplay
+       when IT->position is set up wrongly due to some bug.
+       Set IT->current to match the bidi iterator unconditionally.
+       (push_display_prop): Allow GET_FROM_STRING as IT->method on
+       entry.  Force push_it to save on the stack the current
+       buffer/string position, to be restored by pop_it.  Fix flags in
+       the iterator structure wrt the object coming from a display
+       property, as `line-prefix' and `wrap-prefix' are not ``replacing''
+       properties.  (Bug#9284)
+
+2011-08-09  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * fontset.c (fontset_get_font_group): Add proper type checks.
+       (Bug#9172)
+
+2011-08-09  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+       * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
+       and LC_VERSION_MIN_MACOSX.
+       (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
+       (dump_it) [LC_FUNCTION_STARTS]: Use it.
+
+2011-08-08  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (forward_to_next_line_start): Allow to use the
+       no-display-properties-and-no-overlays under bidi display.
+       Set disp_pos in the bidi iterator to avoid searches for display
+       properties and overlays.
+
+2011-08-08  Chong Yidong  <cyd@stupidchicken.com>
+
+       * editfns.c (Fset_time_zone_rule): Document relationship with the
+       setenv function.
+
+       * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
+       the font entity extracted from the cache (Bug#8109).
+
+2011-08-07  Chong Yidong  <cyd@stupidchicken.com>
+
+       * composite.c (autocmp_chars): Don't reset point.  That is done by
+       restore_point_unwind (Bug#5984).
+
+2011-08-07  Juri Linkov  <juri@jurta.org>
+
+       * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
+       to show the arg `TIME' instead of `TIMEVAL'.
+
+2011-08-06  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
+       display property strides EOL and includes a newline, as in
+       longlines-mode.  (Bug#9254)
+       (move_it_in_display_line_to): Fix vertical-motion in a buffer with
+       word-wrap under bidirectional display.  (Bug#9224)
+
+       * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
+       is non-zero, even if the data buffer is NULL.  Fixes a crash in
+       vertical-motion with longlines-mode.  (Bug#9254)
+
+2011-08-05  Eli Zaretskii  <eliz@gnu.org>
+
+       * bidi.c <bidi_cache_total_alloc>: 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  <eliz@gnu.org>
+
+       * 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  <jan.h.d@swipnet.se>
+
+       * 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  <schwab@linux-m68k.org>
+
+       * regex.c (re_iswctype): Remove some redundant boolean
+       conversions.
+
+2011-08-04  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * 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  <eggert@cs.ucla.edu>
+
+       * callproc.c (Fcall_process): Avoid vfork clobbering
+       the local vars buffer, coding_systems, current_dir.
+
+2011-08-03  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * keymap.c (Fmake_composed_keymap): Move to subr.el.
+
+2011-08-03  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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  <eliz@gnu.org>
+
+       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  <monnier@iro.umontreal.ca>
+
+       * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
+
+2010-12-03  Don March  <don@ohspite.net>
+
+       * 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  <handa@m17n.org>
+
+       * lisp.h (uniprop_table): Extern it.
+
+       * chartab.c (uniprop_table): Make it non-static.
+
+2011-08-01  Eli Zaretskii  <eliz@gnu.org>
+
+       * 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  <schwab@linux-m68k.org>
+
+       * regex.c (re_comp): Protoize.
+       (re_exec): Fix return type.
+       (regexec): Fix type of `ret'.  (Bug#9203)
+
+2011-07-29  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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  <schwab@linux-m68k.org>
 
        * print.c (print_object): Print empty symbol as ##.
 
        * 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
+       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.
 
        (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.
        (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
        (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.
        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.
        `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
        (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
        (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.
        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  <dann@ics.uci.edu>
        (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.
        (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  <eggert@cs.ucla.edu>
 
        (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  <rudalics@gmx.at>
 
        * 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.
 
        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.
        (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.
 
        (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  <cyd@stupidchicken.com>
        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
        (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,
        * 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
        (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  <rudalics@gmx.at>
        (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.
        (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
        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.