-2011-09-03 Paul Eggert <eggert@cs.ucla.edu>
+2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
- * fileio.c: Fix bugs with large file offsets.
+ * keymap.c (Fsingle_key_description): Use make_specified_string
+ instead of build_string to build string from push_key_description.
+ (Bug#5193)
+
+2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
+ This fixes a Y2038 bug on 64-bit hosts.
+ * buffer.c (reset_buffer):
+ * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
+ (Fclear_buffer_auto_save_failure):
+ Use 0, not -1, to represent an unset failure time, since time_t
+ might not be signed.
+
+ Remove dependency on glibc malloc internals.
+ * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
+ Move back here from lisp.h, but with their new implementations.
+ (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
+ (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
+ * charset.c (charset_table_init): New static var.
+ (syms_of_charset): Use it instead of xmalloc. This removes a
+ dependency on glibc malloc internals. See Eli Zaretskii's comment in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
+ * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
+ Move back to alloc.c.
+ (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
+ (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
+
+2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (windowDidResize): Call x_set_window_size only when
+ ns_in_resize is true. Otherwise set pixelwidth/height and
+ call change_frame_size (Bug#9628).
+
+2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port --enable-checking=all to Fedora 14 x86-64.
+ * charset.c (syms_of_charset): Also account for glibc malloc's
+ internal overhead when calculating the initial malloc maximum.
+
+ Port --enable-checking=all to Fedora 14 x86.
+ * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
+ Move to lisp.h.
+ (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
+ (overrun_check_realloc, overrun_check_free):
+ Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
+ That way, xmalloc returns a properly-aligned pointer even if
+ XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
+ to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
+ * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
+ into account when calculating the initial malloc maximum.
+ * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
+ Move here from alloc.c, so that charset.c can use it too.
+ Properly align; the old code wasn't right for common 32-bit hosts
+ when configured with --enable-checking=all.
+ (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
+ (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
+
+2011-09-29 Eli Zaretskii <eliz@gnu.org>
+
+ * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
+ use EDOM.
+
+2011-09-28 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (compute_display_string_end): If there's no display
+ string at CHARPOS, return -1.
+
+ * bidi.c (bidi_fetch_char): When compute_display_string_end
+ returns a negative value, treat the character as a normal
+ character not covered by a display string. (Bug#9624)
+
+2011-09-28 Juanma Barranquero <lekktu@gmail.com>
+
+ * lread.c (Fread_from_string): Fix typo in docstring.
+
+2011-09-27 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (handle_invisible_prop): If invisible text ends on a
+ newline, reseat the iterator instead of bidi-iterating there one
+ character at a time. (Bug#9610)
+ (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail out when
+ past TO_CHARPOS if the bidi iterator is at base embedding level.
+
+2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
+
+ * lread.c (readevalloop): Use correct code for NBSP.
+ (read1): Likewise. (Bug#9608)
+
+2011-09-25 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (Fdbus_register_signal): When service is not
+ registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
+
+2011-09-25 Glenn Morris <rgm@gnu.org>
+
+ * buffer.c (truncate-lines): Doc fix.
+
+2011-09-24 Chong Yidong <cyd@stupidchicken.com>
+
+ * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
+ (Fset_window_next_buffers): Doc fix.
+
+2011-09-24 Glenn Morris <rgm@gnu.org>
+
+ * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
+
+2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix minor problems found by static checking.
+ * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
+ * indent.c (Fvertical_motion): Fix == vs = typo.
+
+2011-09-24 Eli Zaretskii <eliz@gnu.org>
+
+ * dispnew.c (syms_of_display) <redisplay-dont-pause>: Default
+ value is now t. Doc fix.
+
+ * indent.c (Fvertical_motion): Compute and apply the overshoot
+ logic also when moving up, not only when moving down. Fix the
+ confusing name and values of the it_overshoot_expected variable;
+ logic changed accordingly. (Bug#9254) (Bug#9549)
+
+ * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
+ CHARPOS is covered by a display string which includes newlines.
+ (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
+ is covered by a display string with embedded newlines.
+
+2011-09-24 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (Fdbus_register_signal): Add match rule to
+ Vdbus_registered_objects_table. (Bug#9581)
+ (Fdbus_register_method, Vdbus_registered_objects_table): Fix
+ docstring.
+
+2011-09-24 Jim Meyering <meyering@redhat.com>
+
+ Do not ignore write error for any output size.
+ The previous change was incomplete.
+ While it makes emacs --batch detect the vast majority of stdout
+ write failures, errors were still ignored whenever the output size is
+ k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
+ $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
+ && echo FAIL: ignored write error
+ FAIL: ignored write error
+ $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
+ && echo FAIL: ignored write error
+ FAIL: ignored write error
+ * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
+
+2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
+
+ * emacs.c (Fkill_emacs): In noninteractive mode exit
+ non-successfully if a write error occurred on stdout. (Bug#9574)
+
+2011-09-21 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
+ the xassert test.
+
+ * dispextern.h (struct it): Update the comment documenting what
+ can it->OBJECT be.
+
+2011-09-20 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (set_cursor_from_row): If the row ends in a newline from
+ a display string, extend search for cursor position to end of row.
+ (find_row_edges): If the row ends in a newline from a display
+ string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
+ Handle the case of a display string with multiple newlines.
+ (Fcurrent_bidi_paragraph_direction): Fix search for previous
+ non-empty line. Fixes confusing cursor motion with arrow keys at
+ the beginning of a line that starts with whitespace.
+
+2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
+ (bug#9493).
+
+2011-09-18 Chong Yidong <cyd@stupidchicken.com>
+
+ * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
+ boolean (Bug#9154).
+
+2011-09-18 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (display_line): Record maximum and minimum buffer
+ positions even if no glyphs were produced (e.g., by a zero-width
+ stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
+ buffer positions that will be removed from the glyph row because
+ they don't fit.
+ (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
+ column is beyond frame width: don't subtract 1 "pixel" when
+ computing width of the stretch.
+ (reseat_at_next_visible_line_start): Undo the change made on
+ 2011-09-17 that saved paragraph information and restored it after
+ the call to `reseat'. (Bug#9545)
+
+2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xdisp.c (expose_window): Save original value of phys_cursor_on_p
+ and turn window cursor on if cleared (Bug#9415).
+
+2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
+
+ * search.c (boyer_moore): Take unibyte characters from pattern
+ literally. (Bug#9458)
+
+2011-09-18 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
+
+2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix minor problem found by static checking.
+ * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
+ initialized, to pacify gcc -Wuninitialized.
+
+ * fileio.c: Report proper errno when syscall falls.
+ (Finsert_file_contents): Save and restore errno,
+ so that report_file_error outputs the correct diagnostic.
+ (Fwrite_region) [CLASH_DETECTION]: Likewise.
+
+2011-09-18 Eli Zaretskii <eliz@gnu.org>
+
+ * .gdbinit (pgx): Fix references to fields of `struct glyph'.
+
+2011-09-17 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (produce_stretch_glyph): Another fix for changes made on
+ 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
+
+2011-09-17 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (reseat_at_next_visible_line_start): Keep information
+ about the current paragraph and restore it after the call to
+ reseat.
+
+ * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
+ (bidi_find_paragraph_start): Search back for paragraph beginning
+ at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
+ (bidi_move_to_visually_next): Only trigger paragraph-related
+ computations when the last character is a newline or at EOB, not
+ just any NEUTRAL_B. (Bug#9470)
+
+ * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
+ truncated lines if point is covered by a display string. (Bug#9524)
+
+2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xselect.c: Relax test for outgoing X longs (Bug#9498).
+ (cons_to_x_long): New function.
+ (lisp_data_to_selection_data): Use it. Correct the test for
+ short-versus-long data; it was negated. Break out of vector
+ loop, for efficiency, when a long datum is discovered.
+
+2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * eval.c (Fquote): Document its non-consing behavior (bug#9482).
+
+2011-09-16 Eli Zaretskii <eliz@gnu.org>
+
+ * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
+ GCC PR/17406) by declaring this function with external scope.
+
+2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
+ Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
+
+2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * editfns.c (Fformat): Correctly handle text properties on "%%".
+
+2011-09-15 Eli Zaretskii <eliz@gnu.org>
+
+ * xterm.c (x_draw_composite_glyph_string_foreground):
+ * w32term.c (x_draw_composite_glyph_string_foreground):
+ * term.c (encode_terminal_code):
+ * composite.c (composition_update_it, get_composition_id):
+ * xdisp.c (get_next_display_element)
+ (fill_composite_glyph_string): Add comments about special meaning
+ of TAB characters in a composition.
+
+2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
+
+ * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
+ This occurs when processing a multibyte format.
+ Problem reported by Wolfgang Jenker.
+
+2011-09-15 Johan Bockgård <bojohan@gnu.org>
+
+ * xdisp.c (try_cursor_movement): Only check for exact match if
+ cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
+
+2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove unused external symbols.
+ * dispextern.h (calc_pixel_width_or_height): Remove decl.
+ * xdisp.c (calc_pixel_width_or_height): Now static.
+ * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
+ * indent.c (check_display_width):
+ * w32term.c: Fix comment to match code.
+ * xterm.c, xterm.h (x_catching_errors): Remove.
+
+2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xselect.c: Use signed conversions more consistently (Bug#9498).
+ (selection_data_to_lisp_data): Assume incoming selection data are
+ signed integers, not unsigned. This is to be consistent with
+ outgoing selection data, which was modified to use signed integers
+ in as part of the fix to Bug#9196 in response to Jan D.'s comment
+ in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
+ expects long, not unsigned long.
+
+2011-09-14 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
+ computation of loop end. Reported by Johan Bockgård
+ <bojohan@gnu.org>.
+
+2011-09-13 Chong Yidong <cyd@stupidchicken.com>
+
+ * frame.c (Fother_visible_frames_p): Function deleted.
+
+2011-09-12 Eli Zaretskii <eliz@gnu.org>
+
+ * indent.c (compute_motion): Process display vector front to back
+ rather than the other way around. (Bug#2496)
+
+2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
+
+2011-09-11 Chong Yidong <cyd@stupidchicken.com>
+
+ * minibuf.c (Fread_from_minibuffer): Doc fix.
+
+2011-09-11 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
+ 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
+
+2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
+ value for non-existent files.
+
+2011-09-11 Eli Zaretskii <eliz@gnu.org>
+
+ * fileio.c (Finsert_file_contents): If the file cannot be opened,
+ set its "size" to -1. This will set the modtime_size field of
+ the corresponding buffer to -1, which is what
+ verify-visited-file-modtime expects for files that do not exist.
+ (Bug#9139)
+
+2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
+ here ...
+ * lisp.h: ... from here. push_key_description is no longer
+ defined in keyboard.c, so its declaration should not be in
+ lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
+ logically belongs with push_key_description.
+
+2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * buffer.h: Include <sys/types.h> instead of <time.h>.
+ Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
+ Problem reported by Herbert J. Skuhra.
+
+2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * xml.c (parse_region): Make the parsing work for
+ non-comment-starting XML files again (bug#9144).
+
+2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
+
+ * image.c (gif_load): Fix calculation of bottom and right corner.
+ (Bug#9468)
+
+2011-09-10 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
+ redisplay in small windows.
+
+2011-09-09 Eli Zaretskii <eliz@gnu.org>
+
+ * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
+
+2011-09-08 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
+ Operate on live windows only.
+
+2011-09-08 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
+
+2011-09-07 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
+ only under bidi iteration.
+
+2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
+
+2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ isnan: Fix porting problem to Solaris 10 with bundled gcc.
+ Without this fix, the command to link temacs failed due to an
+ undefined symbol __builtin_isnan. This is because
+ /usr/include/iso/math_c99.h #defines isnan(x) to
+ __builtin_isnan(x), but the bundled gcc, which identifies itself
+ as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
+ a __builtin_isnan.
+ * floatfns.c (isnan): #undef, and then #define to a clone of
+ what's in data.c.
+ (Fisnan): Always define, since it's always available now.
+ (syms_of_floatfns): Always define isnan at the Lisp level.
+
+2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
+
+2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ * fileio.c: Fix bugs with large file offsets (Bug#9428).
The previous code assumed that file offsets (off_t values) fit in
EMACS_INT variables, which is not true on typical 32-bit hosts.
The code messed up by falsely reporting buffer overflow in cases
(Fwrite_region): Don't assume off_t fits into 'long'.
* buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
+2011-09-05 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (xd_signature_cat): Rename from signature_cat.
+
+2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ sprintf-related integer and memory overflow issues (Bug#9412).
+
+ * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
+ (esprintf, 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, exprintf, evxprintf): New decls.
+ * window.h (command_loop_level, minibuf_level): Reflect API changes.
+
+ * dbusbind.c (signature_cat): New function.
+ (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: Include <float.h>, for DBL_MAX_10_EXP.
+ (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.
+ (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.
+
+ * fontset.c (num_auto_fontsets): Now printmax_t, not int.
+ (fontset_from_font): Print it.
+
+ * frame.c (tty_frame_count): Now printmax_t, not int.
+ (make_terminal_frame, set_term_frame_name): Print it.
+ (x_report_frame_params): In X, window IDs are unsigned long,
+ not signed long, so print them as unsigned.
+ (validate_x_resource_name): Check for implausibly long names,
+ and don't assume name length fits in 'int'.
+ (x_get_resource_string): Don't blindly alloca invocation name;
+ use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
+ not fit in int.
+
+ * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
+ (xg_check_special_colors, xg_set_geometry):
+ Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
+
+ * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
+ Use esprintf, not sprintf, in case result does not fit in int.
+
+ * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
+ (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
+ it as a large positive number.
+ (Fexecute_kbd_macro): Don't assume repeat count fits in int.
+ * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
+
+ * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
+ in case result does not fit in int.
+
+ * print.c (float_to_string): Detect width overflow more reliably.
+ (print_object): Make sprintf buffer a bit bigger, to avoid potential
+ buffer overrun. Don't assume list length fits in 'int'. Treat
+ print length of 0 as 0, not as infinity; to be consistent with other
+ uses of print length in this function. Don't overflow print length
+ index. Don't assume hash table size fits in 'long', or that
+ vectorlike size fits in 'unsigned long'.
+
+ * process.c (make_process): Use printmax_t, not int, to format
+ process-name gensyms.
+
+ * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
+
+ * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
+ to avoid potential buffer overrun.
+
+ * xfaces.c (x_update_menu_appearance): Don't overrun buffer
+ if X resource line is longer than 512 bytes.
+
+ * xfns.c (x_window): Make sprintf buffer a bit bigger
+ to avoid potential buffer overrun.
+
+ * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
+
+ * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
+
+2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Integer overflow fixes for scrolling, etc.
+ Without these, Emacs silently mishandles large integers sometimes.
+ For example, "C-u 4294967297 M-x recenter" was treated as if
+ it were "C-u 1 M-x recenter" on a typical 64-bit host.
+
+ * xdisp.c (try_window_id): Check Emacs fixnum range before
+ converting to 'int'.
+
+ * window.c (window_scroll_line_based, Frecenter):
+ Check that an Emacs fixnum is in range before assigning it to 'int'.
+ (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
+ values converted from Emacs fixnums.
+ (Frecenter): Don't wrap around a line count if it is out of 'int'
+ range; instead, treat it as an extreme value.
+ (Fset_window_configuration, compare_window_configurations):
+ Use ptrdiff_t, not int, for index that might exceed 2 GiB.
+
+ * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
+ that can exceed INT_MAX. Check that EMACS_INT value is in range
+ before assigning it to the (possibly-narrower) index.
+ (match_limit): Don't assume that a fixnum can fit in 'int'.
+
+ * print.c (print_object): Use ptrdiff_t, not int, for index that can
+ exceed INT_MAX.
+
+ * indent.c (position_indentation): Now takes ptrdiff_t, not int.
+ (Fvertical_motion): Don't wrap around LINES values that don't fit
+ in 'int'. Instead, treat them as extreme values. This is good
+ enough for windows, which can't have more than INT_MAX lines anyway.
+
+2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * Require libxml/parser.h to avoid compilation warning.
+
+ * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
+
+ * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
+ since this reportedly can destroy thread storage.
+
2011-08-30 Chong Yidong <cyd@stupidchicken.com>
* syntax.c (find_defun_start): Update all cache variables if
* 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
+ (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).
* 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
+ 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.
(re_exec): Fix return type.
(regexec): Fix type of `ret'. (Bug#9203)
-2011-07-29 Paul Eggert <eggert@cs.ucla.edu>
+2011-07-28 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.
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.
+ accommodate underlining, etc.
2011-07-28 Eli Zaretskii <eliz@gnu.org>
(Fput_unicode_property_internal): New functions.
(syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
Sunicode_property_table_internal, Sget_unicode_property_internal,
- and Sput_unicode_property_internal. Defvar_lisp
+ and Sput_unicode_property_internal. Defvar_lisp
char-code-property-alist.
* composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
(store_config_changed_event): Add comment.
(dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
(store_tool_bar_style_changed): New functions.
- (store_monospaced_changed): Add comment. Call dpyinfo_valid.
+ (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): Rename from SYSTEM_MONO_FONT.
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): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
+ (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.