From 0bbf00c7f3de9c75372100afc3039d7f5c8a7587 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 15 Sep 2016 15:25:33 -0700 Subject: Prefer now-standard int width macros * src/data.c (ULL_WIDTH): * src/lisp.h (EMACS_INT_WIDTH, BITS_PER_BITS_WORD): * src/lread.c (read_integer): * src/term.c (produce_glyphless_glyph): * src/xterm.c (x_send_scroll_bar_event): Use *_WIDTH macros instead of CHAR_BIT * sizeof. * src/data.c (ULL_WIDTH): Rename from BITS_PER_ULL for consistency with the *_WIDTH standard macros. All uses changed. * src/gmalloc.c (INT_BIT): Remove. All uses replaced with INT_WIDTH. * src/lisp.h (EMACS_INT_WIDTH): Rename from BITS_PER_EMACS_INT for consistency with the *_WIDTH standard macros. All uses changed. (BITS_PER_CHAR): Remove; all uses replaced by CHAR_BIT. This must be the same as CHAR_WIDTH and avoids confusion with Elisp char-width, which counts columns not bits. (BITS_PER_SHORT): Remove; all uses replaced by SHRT_WIDTH. (BITS_PER_LONG): Remove; all uses replaced by LONG_WIDTH. * src/lread.c: Do not include limits.h since CHAR_BIT is no longer used directly. --- src/xselect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xselect.c') diff --git a/src/xselect.c b/src/xselect.c index 156888a540b..93b81b9fca1 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1318,7 +1318,7 @@ x_get_window_property (Display *display, Window window, Atom property, data = data1; } - if (BITS_PER_LONG > 32 && *actual_format_ret == 32) + if (LONG_WIDTH > 32 && *actual_format_ret == 32) { unsigned long i; int *idata = (int *) (data + offset); @@ -2473,7 +2473,7 @@ x_handle_dnd_message (struct frame *f, const XClientMessageEvent *event, function expects them to be of size int (i.e. 32). So to be able to use that function, put the data in the form it expects if format is 32. */ - if (BITS_PER_LONG > 32 && event->format == 32) + if (LONG_WIDTH > 32 && event->format == 32) { for (i = 0; i < 5; ++i) /* There are only 5 longs in a ClientMessage. */ idata[i] = event->data.l[i]; -- cgit v1.2.1