Weitere ähnliche Inhalte
Kürzlich hochgeladen (12)
人力
- 23. ① save global variable
int
rl_bind_key_in_map (key, function, map)
int key;
rl_command_func_t *function;
Keymap map;
{
int result;
Keymap oldmap;
oldmap = _rl_keymap;
_rl_keymap = map;
result = rl_bind_key (key, function);
_rl_keymap = oldmap;
return (result);
}
グローバル変数を保存
- 24. ② set argument to global variable
int
rl_bind_key_in_map (key, function, map)
int key;
rl_command_func_t *function;
Keymap map;
{
int result;
Keymap oldmap;
oldmap = _rl_keymap;
_rl_keymap = map;
result = rl_bind_key (key, function);
_rl_keymap = oldmap;
return (result);
}
引数をグローバル変数にセット
- 26. ④ restore global variable
int
rl_bind_key_in_map (key, function, map)
int key;
rl_command_func_t *function;
Keymap map;
{
int result;
Keymap oldmap;
oldmap = _rl_keymap;
_rl_keymap = map;
result = rl_bind_key (key, function);
_rl_keymap = oldmap;
return (result);
}
グローバル変数を復旧
- 30. Works only on Ruby 1.9
(for character handling)
Ruby 1.9系専用
(文字の扱いが違うので)
- 32. ● “xterm” in terminfo
(I found it this morning)
terminfoで“xterm”
(今朝気付いた)
- 37. MVC
Models Views
Display
Buffer
Keymap
History Controls
Undo Command
Completion
- 39. Main loop
read
while true
seq = read_key_seq(@keymap)
dispatch(seq, @keymap) eval
@display.redisplay
end print
メインループ
- 53. ● Safe signal handling
● More about completion
● History search
● Per-word cursor movement
● Digit argument
● ...