- 2011-04-29 Paul Eggert <eggert@cs.ucla.edu>
-
+2011-04-30 Paul Eggert <eggert@cs.ucla.edu>
+
+ * dispnew.c (scrolling_window): Return 1 if we scrolled,
+ to match comment at start of function. This also removes a
+ GCC warning about overflow in a 32+64-bit port.
+
+ * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
+
+ * dbusbind.c: Do not use XPNTR on a value that may be an integer.
+ Reported by Stefan Monnier in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
+ (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages): Use
+ SYMBOLP-guarded XSYMBOL, not XPNTR.
+
- 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
-
+ * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
+ (EMACS_UINTPTR): Likewise, with uintptr_t.
+
+ * lisp.h: Prefer 64-bit EMACS_INT if available.
+ (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
+ on 32-bit hosts that have 64-bit int, so that they can access
+ large files.
+
+ * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
+
+ Prefer intptr_t/uintptr_t for integers the same widths as pointers.
+ This removes an assumption that EMACS_INT and long are the same
+ width as pointers. The assumption is true for Emacs porting targets
+ now, but we want to make other targets possible.
+ * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
+ (EMACS_INTPTR, EMACS_UINTPTR): New macros.
+ In the rest of the code, change types of integers that hold casted
+ pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
+ replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
+ (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
+ (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
+ No need to cast type when ORing.
+ (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
+ * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
+ * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
+ assume EMACS_INT is the same width as char *.
+ * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
+ (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
+ Remove no-longer-needed casts.
+ (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
+ (xg_tool_bar_help_callback, xg_make_tool_item):
+ Use EMACS_INTPTR to hold an integer
+ that will be cast to void *; this can avoid a GCC warning
+ if EMACS_INT is not the same width as void *.
+ * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
+ * xdisp.c (display_echo_area_1, resize_mini_window_1):
+ (current_message_1, set_message_1):
+ Use a local to convert to proper width without a cast.
+ * xmenu.c (dialog_selection_callback): Likewise.
+
+ * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
+ Also, don't assume VALBITS / RAND_BITS is less than 5,
+ and don't rely on undefined behavior when shifting a 1 left into
+ the sign bit.
+ * lisp.h (get_random): Change signature to match.
+
+ * lread.c (hash_string): Use size_t, not int, for hash computation.
+ Normally we prefer signed values; but hashing is special, because
+ it's better to use unsigned division on hash table sizes so that
+ the remainder is nonnegative. Also, size_t is the natural width
+ for hashing into memory. The previous code used 'int', which doesn't
+ retain enough info to hash well into very large tables.
+ (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
+
+ * dbusbind.c: Don't possibly lose pointer info when converting.
+ (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
+ Use XPNTR rather than XHASH, so that the high-order bits of
+ the pointer aren't lost when converting through void *.
+
+ * eval.c (Fautoload): Don't double-shift a pointer.
+
+ * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
+
+ 2011-04-30 Eli Zaretskii <eliz@gnu.org>
+
+ * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
+ rather than `XVECTOR (FOO)->size'.
+
+ * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
+ inttypes.h, as a gnulib replacement is used if it not available in
+ system headers.
+
+ 2011-04-21 Eli Zaretskii <eliz@gnu.org>
+
+ Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
+ * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
+ of MOST_POSITIVE_FIXNUM. (Bug#8528)
+
+ * coding.c (coding_alloc_by_realloc): Error out if destination
+ will grow beyond MOST_POSITIVE_FIXNUM.
+ (decode_coding_emacs_mule): Abort if there isn't enough place in
+ charbuf for the composition carryover bytes. Reserve an extra
+ space for up to 2 characters produced in a loop.
+ (decode_coding_iso_2022): Abort if there isn't enough place in
+ charbuf for the composition carryover bytes.
+
+ 2011-04-21 Eli Zaretskii <eliz@gnu.org>
+
+ * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
+ aborting when %lld or %lll format is passed.
+ [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
+ %llo or %llx format is passed. (Bug#8545)
+
+ * window.c (window_scroll_line_based): Use a marker instead of
+ simple variables to record original value of point. (Bug#7952)
+
+ * doprnt.c (doprnt): Fix the case where a multibyte sequence
+ produced by %s or %c overflows available buffer space. (Bug#8545)
+
2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
* doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).