restructure read_char quit handling
authorBT Templeton <bt@hcoop.net>
Fri, 5 Jul 2013 02:12:09 +0000 (22:12 -0400)
committerRobin Templeton <robin@terpri.org>
Sat, 18 Apr 2015 22:49:10 +0000 (18:49 -0400)
Move initialization and quit handling to a separate function to simplify
the conversion to Guile control flow facilities.

* src/keyboard.c (struct read_char_state): New data type.

  (read_char): Move most of this function to `read_char_1'. Initialize a
  state structure and a `longjmp' point for quits, then call
  `read_char_1'.

  (read_char_1): New function.

  (save_getcjmp, restore_getcjmp): Take a pointer to a `jmp_buf' as an
  argument. All callers changed.


No differences found