- 2011-06-07 Paul Eggert <eggert@cs.ucla.edu>
-
+2011-06-08 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
+ (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
+ * alloc.c (make_save_value): Integer argument is now of type
+ ptrdiff_t, not int.
+ (mark_object): Use ptrdiff_t, not int.
+ * lisp.h (pD): New macro.
+ * print.c (print_object): Use it.
+
+ * alloc.c: Use EMACS_INT, not int, to count objects.
+ (total_conses, total_markers, total_symbols, total_vector_size)
+ (total_free_conses, total_free_markers, total_free_symbols)
+ (total_free_floats, total_floats, total_free_intervals, total_intervals)
+ (total_strings, total_free_strings):
+ Now EMACS_INT, not int. All uses changed.
+ (Fgarbage_collect): Compute overall total using a double, so that
+ integer overflow is less likely to be a problem. Check for overflow
+ when converting back to an integer.
+ (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
+ (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
+ These were 'int' variables that could overflow on 64-bit hosts;
+ they were never used, so remove them instead of repairing them.
+ (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
+ (inhibit_garbage_collection): Set gc_cons_threshold to max value.
+ Previously, this ceilinged at INT_MAX, but that doesn't work on
+ 64-bit machines.
+ (allocate_pseudovector): Don't use EMACS_INT when int would do.
+
+ * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
+ (allocate_vectorlike): Check for ptrdiff_t overflow.
+ (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
+ when a (possibly-narrower) signed value would do just as well.
+ We prefer using signed arithmetic, to avoid comparison confusion.
+
+ * alloc.c: Catch some string size overflows that we were missing.
+ (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
+ for convenience in STRING_BYTES_MAX.
+ (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
+ The definition here is exact; the one in lisp.h was approximate.
+ (allocate_string_data): Check for string overflow. This catches
+ some instances we weren't catching before. Also, it catches
+ size_t overflow on (unusual) hosts where SIZE_MAX <= min
+ (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
+ and ptrdiff_t and EMACS_INT are both 64 bits.
+
+ * 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.
+
+ * character.c (string_escape_byte8): Fix nbytes/nchars typo.
+
+ * alloc.c (Fmake_string): Check for out-of-range init.
+
+ 2011-06-08 Martin Rudalics <rudalics@gmx.at>
+
+ * window.h (window): Add some new members to window structure -
+ normal_lines, normal_cols, new_total, new_normal, clone_number,
+ splits, nest, prev_buffers, next_buffers.
+ (WINDOW_TOTAL_SIZE): Move here from window.c.
+ (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
+
+ * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
+ Remove.
+ (make_dummy_parent): Set new members of windows structure.
+ (make_window): Move down in code. Handle new members of window
+ structure.
+ (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
+ (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.
+ (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
+ (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
+ Doc-string fixes.
+ (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
+ Argument WINDOW can be now internal window too.
+ (Fwindow_use_time): Move up in code.
+ (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
+ Rewrite doc-string.
+ (Fset_window_configuration, saved_window)
+ (Fcurrent_window_configuration, save_window_save): Handle new
+ members of window structure.
+ (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
+ (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
+ (syms_of_window): New Lisp objects Qrecord_window_buffer,
+ Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
+ Qget_mru_window, Qresize_root_window,
+ Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
+ Qauto_buffer_name; staticpro them.
+
+ 2011-06-07 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (Fwindow_total_size, Fwindow_left_column)
+ (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.
+ (delete_all_subwindows): Take a window as argument and not a
+ structure. Rewrite.
+ (window_loop): Remove handling of GET_LRU_WINDOW and
+ GET_LARGEST_WINDOW.
+ (Fget_lru_window, Fget_largest_window): Move to window.el.
+
+ * window.h: Extern window_body_cols instead of
+ 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.
+
+ * frame.c (delete_frame): Call delete_all_subwindows with root
+ window as argument.
+
2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
* fns.c (Fputhash): Document return value.