This is (very slightly) less likely to mess up due to wraparound.
All uses changed.
2011-07-07 Paul Eggert <eggert@cs.ucla.edu>
+ * keyboard.h (num_input_events): Now uintmax_t.
+ This is (very slightly) less likely to mess up due to wraparound.
+ All uses changed.
+
* buffer.c: Integer signedness fixes.
(alloc_buffer_text, enlarge_buffer_text):
Use ptrdiff_t rather than size_t when either will do, as we prefer
{
Lisp_Object input;
Lisp_Object funval = Findirect_function (function, Qt);
- size_t events = num_input_events;
+ uintmax_t events = num_input_events;
input = specs;
/* Compute the arg values using the user's expression. */
GCPRO2 (input, filter_specs);
/* Last size recorded for a current buffer which is not a minibuffer. */
static EMACS_INT last_non_minibuf_size;
-/* Total number of times read_char has returned, modulo SIZE_MAX + 1. */
-size_t num_input_events;
+/* Total number of times read_char has returned, modulo UINTMAX_MAX + 1. */
+uintmax_t num_input_events;
/* Value of num_nonmacro_input_events as of last auto save. */
/* A list of all kboard objects, linked through next_kboard. */
extern KBOARD *all_kboards;
\f
-/* Total number of times read_char has returned, modulo SIZE_MAX + 1. */
-extern size_t num_input_events;
+/* Total number of times read_char has returned, modulo UINTMAX_MAX + 1. */
+extern uintmax_t num_input_events;
/* Nonzero means polling for input is temporarily suppressed. */
extern int poll_suppress_count;