Improve integer overflow handling a bit
commitb3e1b382456b0f7d108c57d6f902bbddfdd97b2a
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 24 Sep 2016 09:35:13 +0000 (24 02:35 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 24 Sep 2016 09:35:29 +0000 (24 02:35 -0700)
treeaa3bcb76dfb30dace2811de0612a569daf250d8d
parent4f05e930ca9ca4fa87aa2bc83187590432d792bd
Improve integer overflow handling a bit

* src/charset.c (read_hex): Use INT_LEFT_SHIFT_OVERFLOW for clarity.
The machine code is the same on my platform.
* src/doprnt.c (doprnt):
* src/emacs-module.c (module_funcall):
* src/font.c (font_intern_prop):
* src/keyboard.c (Frecursion_depth):
* src/lread.c (read1):
Use WRAPV macros instead of checking overflow by hand.
* src/editfns.c (hi_time, time_arith, decode_time_components):
* src/emacs-module.c (Fmodule_load):
Simplify by using FIXNUM_OVERFLOW_P.
* src/emacs-module.c: Include intprops.h.
* src/xdisp.c (percent99): New function.
(decode_mode_spec): Use it to simplify overflow avoidance and
formatting of %p and %P.
src/charset.c
src/doprnt.c
src/editfns.c
src/emacs-module.c
src/font.c
src/keyboard.c
src/lread.c
src/xdisp.c