2011-03-27 Paul Eggert <eggert@cs.ucla.edu>
+ * keyboard.c, keyboard.h (num_input_events): Now size_t.
+ This avoids undefined behavior on integer overflow, and is a bit
+ more convenient anyway since it is compared to a size_t variable.
+
Variadic C functions now count arguments with size_t, not int.
This avoids an unnecessary limitation on 64-bit machines, which
caused (substring ...) to crash on large vectors (Bug#8344).
/* 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. */
-int num_input_events;
+/* Total number of times read_char has returned, modulo SIZE_MAX + 1. */
+size_t num_input_events;
/* Value of num_nonmacro_input_events as of last auto save. */
/* Nonzero in the single-kboard state, 0 in the any-kboard state. */
extern int single_kboard;
\f
-/* Total number of times read_char has returned. */
-extern int num_input_events;
+/* Total number of times read_char has returned, modulo SIZE_MAX + 1. */
+extern size_t num_input_events;
/* Nonzero means polling for input is temporarily suppressed. */
extern int poll_suppress_count;