diff options
| author | Andreas Schwab | 2010-07-05 19:16:59 +0200 |
|---|---|---|
| committer | Andreas Schwab | 2010-07-05 19:16:59 +0200 |
| commit | 9d70a3fc8ee03ee1eb9add17ef6ae04aedce9653 (patch) | |
| tree | 9dfdddbb8c7f6929c84e4c39e3b8690ef119069e /src | |
| parent | 5a874e95ef18724f1658e10785baddaf6761cfd7 (diff) | |
| download | emacs-9d70a3fc8ee03ee1eb9add17ef6ae04aedce9653.tar.gz emacs-9d70a3fc8ee03ee1eb9add17ef6ae04aedce9653.zip | |
Remove obsolete volatile
* keyboard.c: Remove duplicate <setjmp.h>.
(read_key_sequence): Remove volatile qualifiers.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keyboard.c | 49 |
2 files changed, 29 insertions, 25 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index ce190e745e0..9ca8ac29dd8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-07-05 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * keyboard.c: Remove duplicate <setjmp.h>. | ||
| 4 | (read_key_sequence): Remove volatile qualifiers. | ||
| 5 | |||
| 1 | 2010-07-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2010-07-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * dispextern.h (FRINGE_HEIGHT_BITS): New define. | 8 | * dispextern.h (FRINGE_HEIGHT_BITS): New define. |
diff --git a/src/keyboard.c b/src/keyboard.c index 836fc183eac..056e379a44a 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -42,7 +42,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 42 | #include "puresize.h" | 42 | #include "puresize.h" |
| 43 | #include "systime.h" | 43 | #include "systime.h" |
| 44 | #include "atimer.h" | 44 | #include "atimer.h" |
| 45 | #include <setjmp.h> | ||
| 46 | #include <errno.h> | 45 | #include <errno.h> |
| 47 | 46 | ||
| 48 | #ifdef HAVE_GTK_AND_PTHREAD | 47 | #ifdef HAVE_GTK_AND_PTHREAD |
| @@ -9182,48 +9181,48 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9182 | int can_return_switch_frame; | 9181 | int can_return_switch_frame; |
| 9183 | int fix_current_buffer; | 9182 | int fix_current_buffer; |
| 9184 | { | 9183 | { |
| 9185 | volatile Lisp_Object from_string; | 9184 | Lisp_Object from_string; |
| 9186 | volatile int count = SPECPDL_INDEX (); | 9185 | int count = SPECPDL_INDEX (); |
| 9187 | 9186 | ||
| 9188 | /* How many keys there are in the current key sequence. */ | 9187 | /* How many keys there are in the current key sequence. */ |
| 9189 | volatile int t; | 9188 | int t; |
| 9190 | 9189 | ||
| 9191 | /* The length of the echo buffer when we started reading, and | 9190 | /* The length of the echo buffer when we started reading, and |
| 9192 | the length of this_command_keys when we started reading. */ | 9191 | the length of this_command_keys when we started reading. */ |
| 9193 | volatile int echo_start; | 9192 | int echo_start; |
| 9194 | volatile int keys_start; | 9193 | int keys_start; |
| 9195 | 9194 | ||
| 9196 | /* The number of keymaps we're scanning right now, and the number of | 9195 | /* The number of keymaps we're scanning right now, and the number of |
| 9197 | keymaps we have allocated space for. */ | 9196 | keymaps we have allocated space for. */ |
| 9198 | volatile int nmaps; | 9197 | int nmaps; |
| 9199 | volatile int nmaps_allocated = 0; | 9198 | int nmaps_allocated = 0; |
| 9200 | 9199 | ||
| 9201 | /* defs[0..nmaps-1] are the definitions of KEYBUF[0..t-1] in | 9200 | /* defs[0..nmaps-1] are the definitions of KEYBUF[0..t-1] in |
| 9202 | the current keymaps. */ | 9201 | the current keymaps. */ |
| 9203 | Lisp_Object *volatile defs = NULL; | 9202 | Lisp_Object *defs = NULL; |
| 9204 | 9203 | ||
| 9205 | /* submaps[0..nmaps-1] are the prefix definitions of KEYBUF[0..t-1] | 9204 | /* submaps[0..nmaps-1] are the prefix definitions of KEYBUF[0..t-1] |
| 9206 | in the current keymaps, or nil where it is not a prefix. */ | 9205 | in the current keymaps, or nil where it is not a prefix. */ |
| 9207 | Lisp_Object *volatile submaps = NULL; | 9206 | Lisp_Object *submaps = NULL; |
| 9208 | 9207 | ||
| 9209 | /* The local map to start out with at start of key sequence. */ | 9208 | /* The local map to start out with at start of key sequence. */ |
| 9210 | volatile Lisp_Object orig_local_map; | 9209 | Lisp_Object orig_local_map; |
| 9211 | 9210 | ||
| 9212 | /* The map from the `keymap' property to start out with at start of | 9211 | /* The map from the `keymap' property to start out with at start of |
| 9213 | key sequence. */ | 9212 | key sequence. */ |
| 9214 | volatile Lisp_Object orig_keymap; | 9213 | Lisp_Object orig_keymap; |
| 9215 | 9214 | ||
| 9216 | /* 1 if we have already considered switching to the local-map property | 9215 | /* 1 if we have already considered switching to the local-map property |
| 9217 | of the place where a mouse click occurred. */ | 9216 | of the place where a mouse click occurred. */ |
| 9218 | volatile int localized_local_map = 0; | 9217 | int localized_local_map = 0; |
| 9219 | 9218 | ||
| 9220 | /* The index in submaps[] of the first keymap that has a binding for | 9219 | /* The index in submaps[] of the first keymap that has a binding for |
| 9221 | this key sequence. In other words, the lowest i such that | 9220 | this key sequence. In other words, the lowest i such that |
| 9222 | submaps[i] is non-nil. */ | 9221 | submaps[i] is non-nil. */ |
| 9223 | volatile int first_binding; | 9222 | int first_binding; |
| 9224 | /* Index of the first key that has no binding. | 9223 | /* Index of the first key that has no binding. |
| 9225 | It is useless to try fkey.start larger than that. */ | 9224 | It is useless to try fkey.start larger than that. */ |
| 9226 | volatile int first_unbound; | 9225 | int first_unbound; |
| 9227 | 9226 | ||
| 9228 | /* If t < mock_input, then KEYBUF[t] should be read as the next | 9227 | /* If t < mock_input, then KEYBUF[t] should be read as the next |
| 9229 | input key. | 9228 | input key. |
| @@ -9238,7 +9237,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9238 | restart_sequence; the loop will read keys from keybuf up until | 9237 | restart_sequence; the loop will read keys from keybuf up until |
| 9239 | mock_input, thus rebuilding the state; and then it will resume | 9238 | mock_input, thus rebuilding the state; and then it will resume |
| 9240 | reading characters from the keyboard. */ | 9239 | reading characters from the keyboard. */ |
| 9241 | volatile int mock_input = 0; | 9240 | int mock_input = 0; |
| 9242 | 9241 | ||
| 9243 | /* If the sequence is unbound in submaps[], then | 9242 | /* If the sequence is unbound in submaps[], then |
| 9244 | keybuf[fkey.start..fkey.end-1] is a prefix in Vfunction_key_map, | 9243 | keybuf[fkey.start..fkey.end-1] is a prefix in Vfunction_key_map, |
| @@ -9248,28 +9247,28 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9248 | should hold off until t reaches them. We do this when we've just | 9247 | should hold off until t reaches them. We do this when we've just |
| 9249 | recognized a function key, to avoid searching for the function | 9248 | recognized a function key, to avoid searching for the function |
| 9250 | key's again in Vfunction_key_map. */ | 9249 | key's again in Vfunction_key_map. */ |
| 9251 | volatile keyremap fkey; | 9250 | keyremap fkey; |
| 9252 | 9251 | ||
| 9253 | /* Likewise, for key_translation_map and input-decode-map. */ | 9252 | /* Likewise, for key_translation_map and input-decode-map. */ |
| 9254 | volatile keyremap keytran, indec; | 9253 | keyremap keytran, indec; |
| 9255 | 9254 | ||
| 9256 | /* Non-zero if we are trying to map a key by changing an upper-case | 9255 | /* Non-zero if we are trying to map a key by changing an upper-case |
| 9257 | letter to lower case, or a shifted function key to an unshifted | 9256 | letter to lower case, or a shifted function key to an unshifted |
| 9258 | one. */ | 9257 | one. */ |
| 9259 | volatile int shift_translated = 0; | 9258 | int shift_translated = 0; |
| 9260 | 9259 | ||
| 9261 | /* If we receive a `switch-frame' or `select-window' event in the middle of | 9260 | /* If we receive a `switch-frame' or `select-window' event in the middle of |
| 9262 | a key sequence, we put it off for later. | 9261 | a key sequence, we put it off for later. |
| 9263 | While we're reading, we keep the event here. */ | 9262 | While we're reading, we keep the event here. */ |
| 9264 | volatile Lisp_Object delayed_switch_frame; | 9263 | Lisp_Object delayed_switch_frame; |
| 9265 | 9264 | ||
| 9266 | /* See the comment below... */ | 9265 | /* See the comment below... */ |
| 9267 | #if defined (GOBBLE_FIRST_EVENT) | 9266 | #if defined (GOBBLE_FIRST_EVENT) |
| 9268 | Lisp_Object first_event; | 9267 | Lisp_Object first_event; |
| 9269 | #endif | 9268 | #endif |
| 9270 | 9269 | ||
| 9271 | volatile Lisp_Object original_uppercase; | 9270 | Lisp_Object original_uppercase; |
| 9272 | volatile int original_uppercase_position = -1; | 9271 | int original_uppercase_position = -1; |
| 9273 | 9272 | ||
| 9274 | /* Gets around Microsoft compiler limitations. */ | 9273 | /* Gets around Microsoft compiler limitations. */ |
| 9275 | int dummyflag = 0; | 9274 | int dummyflag = 0; |
| @@ -9277,7 +9276,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9277 | struct buffer *starting_buffer; | 9276 | struct buffer *starting_buffer; |
| 9278 | 9277 | ||
| 9279 | /* List of events for which a fake prefix key has been generated. */ | 9278 | /* List of events for which a fake prefix key has been generated. */ |
| 9280 | volatile Lisp_Object fake_prefixed_keys = Qnil; | 9279 | Lisp_Object fake_prefixed_keys = Qnil; |
| 9281 | 9280 | ||
| 9282 | #if defined (GOBBLE_FIRST_EVENT) | 9281 | #if defined (GOBBLE_FIRST_EVENT) |
| 9283 | int junk; | 9282 | int junk; |
| @@ -9435,13 +9434,13 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 9435 | (say, a mouse click on the mode line which is being treated | 9434 | (say, a mouse click on the mode line which is being treated |
| 9436 | as [mode-line (mouse-...)], then we backtrack to this point | 9435 | as [mode-line (mouse-...)], then we backtrack to this point |
| 9437 | of keybuf. */ | 9436 | of keybuf. */ |
| 9438 | volatile int last_real_key_start; | 9437 | int last_real_key_start; |
| 9439 | 9438 | ||
| 9440 | /* These variables are analogous to echo_start and keys_start; | 9439 | /* These variables are analogous to echo_start and keys_start; |
| 9441 | while those allow us to restart the entire key sequence, | 9440 | while those allow us to restart the entire key sequence, |
| 9442 | echo_local_start and keys_local_start allow us to throw away | 9441 | echo_local_start and keys_local_start allow us to throw away |
| 9443 | just one key. */ | 9442 | just one key. */ |
| 9444 | volatile int echo_local_start, keys_local_start, local_first_binding; | 9443 | int echo_local_start, keys_local_start, local_first_binding; |
| 9445 | 9444 | ||
| 9446 | eassert (indec.end == t || (indec.end > t && indec.end <= mock_input)); | 9445 | eassert (indec.end == t || (indec.end > t && indec.end <= mock_input)); |
| 9447 | eassert (indec.start <= indec.end); | 9446 | eassert (indec.start <= indec.end); |