aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorPaul Eggert2016-09-15 15:25:33 -0700
committerPaul Eggert2016-09-15 15:55:30 -0700
commit0bbf00c7f3de9c75372100afc3039d7f5c8a7587 (patch)
tree79fccec02fc3a9ceb9e04c16ae2117f725910276 /src/lread.c
parent8f4b6a20bfec96086845b2f7161e121b1e41b4ad (diff)
downloademacs-0bbf00c7f3de9c75372100afc3039d7f5c8a7587.tar.gz
emacs-0bbf00c7f3de9c75372100afc3039d7f5c8a7587.zip
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.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index ecd482793a9..dc7c00bbfae 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -27,7 +27,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
27#include <sys/stat.h> 27#include <sys/stat.h>
28#include <sys/file.h> 28#include <sys/file.h>
29#include <errno.h> 29#include <errno.h>
30#include <limits.h> /* For CHAR_BIT. */
31#include <math.h> 30#include <math.h>
32#include <stat-time.h> 31#include <stat-time.h>
33#include "lisp.h" 32#include "lisp.h"
@@ -2471,7 +2470,7 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix)
2471{ 2470{
2472 /* Room for sign, leading 0, other digits, trailing null byte. 2471 /* Room for sign, leading 0, other digits, trailing null byte.
2473 Also, room for invalid syntax diagnostic. */ 2472 Also, room for invalid syntax diagnostic. */
2474 char buf[max (1 + 1 + sizeof (uintmax_t) * CHAR_BIT + 1, 2473 char buf[max (1 + 1 + UINTMAX_WIDTH + 1,
2475 sizeof "integer, radix " + INT_STRLEN_BOUND (EMACS_INT))]; 2474 sizeof "integer, radix " + INT_STRLEN_BOUND (EMACS_INT))];
2476 2475
2477 int valid = -1; /* 1 if valid, 0 if not, -1 if incomplete. */ 2476 int valid = -1; /* 1 if valid, 0 if not, -1 if incomplete. */