aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1995-01-25 08:55:43 +0000
committerKarl Heuer1995-01-25 08:55:43 +0000
commit5fc12a7870637b40e8563c9f19f365d496aa226e (patch)
treef88ae7bc38b0b8c17aa90228908d94e401397aac /src
parentf6064cbe2f3682cce21e6d8063afbd32aaa3ce25 (diff)
downloademacs-5fc12a7870637b40e8563c9f19f365d496aa226e.tar.gz
emacs-5fc12a7870637b40e8563c9f19f365d496aa226e.zip
Add comments and `volatile' keyword to previous change.
Diffstat (limited to 'src')
-rw-r--r--src/lisp.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 1adf5433863..49e87ee98d6 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -491,9 +491,30 @@ typedef struct
491 Lisp_Object this_command_keys; 491 Lisp_Object this_command_keys;
492 Lisp_Object internal_last_event_frame; 492 Lisp_Object internal_last_event_frame;
493 Lisp_Object kbd_buffer_frame_or_window; 493 Lisp_Object kbd_buffer_frame_or_window;
494
495 /* Circular buffer for pre-read keyboard input. */
494 struct input_event *kbd_buffer; 496 struct input_event *kbd_buffer;
497
498 /* Pointer to next available character in kbd_buffer.
499 If kbd_fetch_ptr == kbd_store_ptr, the buffer is empty.
500 This may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the the
501 next available char is in kbd_buffer[0]. */
495 struct input_event *kbd_fetch_ptr; 502 struct input_event *kbd_fetch_ptr;
496 struct input_event *kbd_store_ptr; 503
504 /* Pointer to next place to store character in kbd_buffer. This
505 may be kbd_buffer + KBD_BUFFER_SIZE, meaning that the next
506 character should go in kbd_buffer[0]. */
507 volatile struct input_event *kbd_store_ptr;
508
509 /* The above pair of variables forms a "queue empty" flag. When we
510 enqueue a non-hook event, we increment kbd_store_ptr. When we
511 dequeue a non-hook event, we increment kbd_fetch_ptr. We say that
512 there is input available iff the two counters are not equal.
513
514 Why not just have a flag set and cleared by the enqueuing and
515 dequeuing functions? Such a flag could be screwed up by interrupts
516 at inopportune times. */
517
497 int this_command_key_count; 518 int this_command_key_count;
498 int immediate_echo; 519 int immediate_echo;
499 int echo_after_prompt; 520 int echo_after_prompt;