Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/lib/readline/readline.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||
5 | - | |||||||||||||||||||||||||||||||
6 | - | |||||||||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||||||||
8 | - | |||||||||||||||||||||||||||||||
9 | - | |||||||||||||||||||||||||||||||
10 | - | |||||||||||||||||||||||||||||||
11 | - | |||||||||||||||||||||||||||||||
12 | - | |||||||||||||||||||||||||||||||
13 | - | |||||||||||||||||||||||||||||||
14 | - | |||||||||||||||||||||||||||||||
15 | - | |||||||||||||||||||||||||||||||
16 | - | |||||||||||||||||||||||||||||||
17 | - | |||||||||||||||||||||||||||||||
18 | - | |||||||||||||||||||||||||||||||
19 | - | |||||||||||||||||||||||||||||||
20 | - | |||||||||||||||||||||||||||||||
21 | - | |||||||||||||||||||||||||||||||
22 | - | |||||||||||||||||||||||||||||||
23 | - | |||||||||||||||||||||||||||||||
24 | - | |||||||||||||||||||||||||||||||
25 | - | |||||||||||||||||||||||||||||||
26 | - | |||||||||||||||||||||||||||||||
27 | - | |||||||||||||||||||||||||||||||
28 | - | |||||||||||||||||||||||||||||||
29 | - | |||||||||||||||||||||||||||||||
30 | - | |||||||||||||||||||||||||||||||
31 | extern void _rl_free_history_entry (HIST_ENTRY *); | - | ||||||||||||||||||||||||||||||
32 | - | |||||||||||||||||||||||||||||||
33 | - | |||||||||||||||||||||||||||||||
34 | extern void _rl_parse_colors (void); | - | ||||||||||||||||||||||||||||||
35 | - | |||||||||||||||||||||||||||||||
36 | - | |||||||||||||||||||||||||||||||
37 | - | |||||||||||||||||||||||||||||||
38 | - | |||||||||||||||||||||||||||||||
39 | static char *readline_internal (void); | - | ||||||||||||||||||||||||||||||
40 | static void readline_initialize_everything (void); | - | ||||||||||||||||||||||||||||||
41 | - | |||||||||||||||||||||||||||||||
42 | static void bind_arrow_keys_internal (Keymap); | - | ||||||||||||||||||||||||||||||
43 | static void bind_arrow_keys (void); | - | ||||||||||||||||||||||||||||||
44 | - | |||||||||||||||||||||||||||||||
45 | static void bind_bracketed_paste_prefix (void); | - | ||||||||||||||||||||||||||||||
46 | - | |||||||||||||||||||||||||||||||
47 | static void readline_default_bindings (void); | - | ||||||||||||||||||||||||||||||
48 | static void reset_default_bindings (void); | - | ||||||||||||||||||||||||||||||
49 | - | |||||||||||||||||||||||||||||||
50 | static int _rl_subseq_result (int, Keymap, int, int); | - | ||||||||||||||||||||||||||||||
51 | static int _rl_subseq_getchar (int); | - | ||||||||||||||||||||||||||||||
52 | - | |||||||||||||||||||||||||||||||
53 | - | |||||||||||||||||||||||||||||||
54 | - | |||||||||||||||||||||||||||||||
55 | - | |||||||||||||||||||||||||||||||
56 | - | |||||||||||||||||||||||||||||||
57 | - | |||||||||||||||||||||||||||||||
58 | - | |||||||||||||||||||||||||||||||
59 | const char *rl_library_version = "5.1"; | - | ||||||||||||||||||||||||||||||
60 | - | |||||||||||||||||||||||||||||||
61 | int rl_readline_version = 0x0700; | - | ||||||||||||||||||||||||||||||
62 | - | |||||||||||||||||||||||||||||||
63 | - | |||||||||||||||||||||||||||||||
64 | int rl_gnu_readline_p = 1; | - | ||||||||||||||||||||||||||||||
65 | - | |||||||||||||||||||||||||||||||
66 | - | |||||||||||||||||||||||||||||||
67 | - | |||||||||||||||||||||||||||||||
68 | Keymap _rl_keymap = emacs_standard_keymap; | - | ||||||||||||||||||||||||||||||
69 | - | |||||||||||||||||||||||||||||||
70 | - | |||||||||||||||||||||||||||||||
71 | int rl_editing_mode = 1; | - | ||||||||||||||||||||||||||||||
72 | - | |||||||||||||||||||||||||||||||
73 | - | |||||||||||||||||||||||||||||||
74 | int rl_insert_mode = 1; | - | ||||||||||||||||||||||||||||||
75 | - | |||||||||||||||||||||||||||||||
76 | - | |||||||||||||||||||||||||||||||
77 | - | |||||||||||||||||||||||||||||||
78 | - | |||||||||||||||||||||||||||||||
79 | int rl_dispatching; | - | ||||||||||||||||||||||||||||||
80 | - | |||||||||||||||||||||||||||||||
81 | - | |||||||||||||||||||||||||||||||
82 | int _rl_last_command_was_kill = 0; | - | ||||||||||||||||||||||||||||||
83 | - | |||||||||||||||||||||||||||||||
84 | - | |||||||||||||||||||||||||||||||
85 | int rl_numeric_arg = 1; | - | ||||||||||||||||||||||||||||||
86 | - | |||||||||||||||||||||||||||||||
87 | - | |||||||||||||||||||||||||||||||
88 | int rl_explicit_arg = 0; | - | ||||||||||||||||||||||||||||||
89 | - | |||||||||||||||||||||||||||||||
90 | - | |||||||||||||||||||||||||||||||
91 | int rl_arg_sign = 1; | - | ||||||||||||||||||||||||||||||
92 | - | |||||||||||||||||||||||||||||||
93 | - | |||||||||||||||||||||||||||||||
94 | static int rl_initialized; | - | ||||||||||||||||||||||||||||||
95 | - | |||||||||||||||||||||||||||||||
96 | - | |||||||||||||||||||||||||||||||
97 | - | |||||||||||||||||||||||||||||||
98 | - | |||||||||||||||||||||||||||||||
99 | - | |||||||||||||||||||||||||||||||
100 | - | |||||||||||||||||||||||||||||||
101 | - | |||||||||||||||||||||||||||||||
102 | unsigned long rl_readline_state = 0x000000; | - | ||||||||||||||||||||||||||||||
103 | - | |||||||||||||||||||||||||||||||
104 | - | |||||||||||||||||||||||||||||||
105 | int rl_point; | - | ||||||||||||||||||||||||||||||
106 | - | |||||||||||||||||||||||||||||||
107 | - | |||||||||||||||||||||||||||||||
108 | int rl_mark; | - | ||||||||||||||||||||||||||||||
109 | - | |||||||||||||||||||||||||||||||
110 | - | |||||||||||||||||||||||||||||||
111 | int rl_end; | - | ||||||||||||||||||||||||||||||
112 | - | |||||||||||||||||||||||||||||||
113 | - | |||||||||||||||||||||||||||||||
114 | int rl_done; | - | ||||||||||||||||||||||||||||||
115 | - | |||||||||||||||||||||||||||||||
116 | - | |||||||||||||||||||||||||||||||
117 | rl_command_func_t *rl_last_func = (rl_command_func_t *) | - | ||||||||||||||||||||||||||||||
118 | ((void *)0) | - | ||||||||||||||||||||||||||||||
119 | ; | - | ||||||||||||||||||||||||||||||
120 | - | |||||||||||||||||||||||||||||||
121 | - | |||||||||||||||||||||||||||||||
122 | sigjmp_buf _rl_top_level; | - | ||||||||||||||||||||||||||||||
123 | - | |||||||||||||||||||||||||||||||
124 | - | |||||||||||||||||||||||||||||||
125 | FILE *_rl_in_stream, *_rl_out_stream; | - | ||||||||||||||||||||||||||||||
126 | - | |||||||||||||||||||||||||||||||
127 | - | |||||||||||||||||||||||||||||||
128 | FILE *rl_instream = (FILE *) | - | ||||||||||||||||||||||||||||||
129 | ((void *)0) | - | ||||||||||||||||||||||||||||||
130 | ; | - | ||||||||||||||||||||||||||||||
131 | FILE *rl_outstream = (FILE *) | - | ||||||||||||||||||||||||||||||
132 | ((void *)0) | - | ||||||||||||||||||||||||||||||
133 | ; | - | ||||||||||||||||||||||||||||||
134 | - | |||||||||||||||||||||||||||||||
135 | - | |||||||||||||||||||||||||||||||
136 | - | |||||||||||||||||||||||||||||||
137 | - | |||||||||||||||||||||||||||||||
138 | - | |||||||||||||||||||||||||||||||
139 | int _rl_echoing_p = 0; | - | ||||||||||||||||||||||||||||||
140 | - | |||||||||||||||||||||||||||||||
141 | - | |||||||||||||||||||||||||||||||
142 | char *rl_prompt = (char *) | - | ||||||||||||||||||||||||||||||
143 | ((void *)0) | - | ||||||||||||||||||||||||||||||
144 | ; | - | ||||||||||||||||||||||||||||||
145 | int rl_visible_prompt_length = 0; | - | ||||||||||||||||||||||||||||||
146 | - | |||||||||||||||||||||||||||||||
147 | - | |||||||||||||||||||||||||||||||
148 | - | |||||||||||||||||||||||||||||||
149 | int rl_already_prompted = 0; | - | ||||||||||||||||||||||||||||||
150 | - | |||||||||||||||||||||||||||||||
151 | - | |||||||||||||||||||||||||||||||
152 | int rl_key_sequence_length = 0; | - | ||||||||||||||||||||||||||||||
153 | - | |||||||||||||||||||||||||||||||
154 | - | |||||||||||||||||||||||||||||||
155 | - | |||||||||||||||||||||||||||||||
156 | rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *) | - | ||||||||||||||||||||||||||||||
157 | ((void *)0) | - | ||||||||||||||||||||||||||||||
158 | ; | - | ||||||||||||||||||||||||||||||
159 | - | |||||||||||||||||||||||||||||||
160 | - | |||||||||||||||||||||||||||||||
161 | - | |||||||||||||||||||||||||||||||
162 | - | |||||||||||||||||||||||||||||||
163 | rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *) | - | ||||||||||||||||||||||||||||||
164 | ((void *)0) | - | ||||||||||||||||||||||||||||||
165 | ; | - | ||||||||||||||||||||||||||||||
166 | - | |||||||||||||||||||||||||||||||
167 | - | |||||||||||||||||||||||||||||||
168 | static char *the_line; | - | ||||||||||||||||||||||||||||||
169 | - | |||||||||||||||||||||||||||||||
170 | - | |||||||||||||||||||||||||||||||
171 | - | |||||||||||||||||||||||||||||||
172 | int _rl_eof_char = (('D') & 0x1f); | - | ||||||||||||||||||||||||||||||
173 | - | |||||||||||||||||||||||||||||||
174 | - | |||||||||||||||||||||||||||||||
175 | int rl_pending_input = 0; | - | ||||||||||||||||||||||||||||||
176 | - | |||||||||||||||||||||||||||||||
177 | - | |||||||||||||||||||||||||||||||
178 | const char *rl_terminal_name = (const char *) | - | ||||||||||||||||||||||||||||||
179 | ((void *)0) | - | ||||||||||||||||||||||||||||||
180 | ; | - | ||||||||||||||||||||||||||||||
181 | - | |||||||||||||||||||||||||||||||
182 | - | |||||||||||||||||||||||||||||||
183 | int _rl_horizontal_scroll_mode = 0; | - | ||||||||||||||||||||||||||||||
184 | - | |||||||||||||||||||||||||||||||
185 | - | |||||||||||||||||||||||||||||||
186 | - | |||||||||||||||||||||||||||||||
187 | int _rl_mark_modified_lines = 0; | - | ||||||||||||||||||||||||||||||
188 | - | |||||||||||||||||||||||||||||||
189 | - | |||||||||||||||||||||||||||||||
190 | - | |||||||||||||||||||||||||||||||
191 | int _rl_bell_preference = 1; | - | ||||||||||||||||||||||||||||||
192 | - | |||||||||||||||||||||||||||||||
193 | - | |||||||||||||||||||||||||||||||
194 | char *_rl_comment_begin; | - | ||||||||||||||||||||||||||||||
195 | - | |||||||||||||||||||||||||||||||
196 | - | |||||||||||||||||||||||||||||||
197 | Keymap rl_executing_keymap; | - | ||||||||||||||||||||||||||||||
198 | - | |||||||||||||||||||||||||||||||
199 | - | |||||||||||||||||||||||||||||||
200 | Keymap _rl_dispatching_keymap; | - | ||||||||||||||||||||||||||||||
201 | - | |||||||||||||||||||||||||||||||
202 | - | |||||||||||||||||||||||||||||||
203 | int rl_erase_empty_line = 0; | - | ||||||||||||||||||||||||||||||
204 | - | |||||||||||||||||||||||||||||||
205 | - | |||||||||||||||||||||||||||||||
206 | - | |||||||||||||||||||||||||||||||
207 | int rl_num_chars_to_read = 0; | - | ||||||||||||||||||||||||||||||
208 | - | |||||||||||||||||||||||||||||||
209 | - | |||||||||||||||||||||||||||||||
210 | char *rl_line_buffer = (char *) | - | ||||||||||||||||||||||||||||||
211 | ((void *)0) | - | ||||||||||||||||||||||||||||||
212 | ; | - | ||||||||||||||||||||||||||||||
213 | int rl_line_buffer_len = 0; | - | ||||||||||||||||||||||||||||||
214 | - | |||||||||||||||||||||||||||||||
215 | - | |||||||||||||||||||||||||||||||
216 | _rl_keyseq_cxt *_rl_kscxt = 0; | - | ||||||||||||||||||||||||||||||
217 | - | |||||||||||||||||||||||||||||||
218 | int rl_executing_key; | - | ||||||||||||||||||||||||||||||
219 | char *rl_executing_keyseq = 0; | - | ||||||||||||||||||||||||||||||
220 | int _rl_executing_keyseq_size = 0; | - | ||||||||||||||||||||||||||||||
221 | - | |||||||||||||||||||||||||||||||
222 | - | |||||||||||||||||||||||||||||||
223 | - | |||||||||||||||||||||||||||||||
224 | int _rl_keyseq_timeout = 500; | - | ||||||||||||||||||||||||||||||
225 | unsigned char _rl_parsing_conditionalized_out = 0; | - | ||||||||||||||||||||||||||||||
226 | - | |||||||||||||||||||||||||||||||
227 | - | |||||||||||||||||||||||||||||||
228 | - | |||||||||||||||||||||||||||||||
229 | - | |||||||||||||||||||||||||||||||
230 | int _rl_convert_meta_chars_to_ascii = 1; | - | ||||||||||||||||||||||||||||||
231 | - | |||||||||||||||||||||||||||||||
232 | - | |||||||||||||||||||||||||||||||
233 | - | |||||||||||||||||||||||||||||||
234 | int _rl_output_meta_chars = 0; | - | ||||||||||||||||||||||||||||||
235 | - | |||||||||||||||||||||||||||||||
236 | - | |||||||||||||||||||||||||||||||
237 | - | |||||||||||||||||||||||||||||||
238 | int _rl_bind_stty_chars = 1; | - | ||||||||||||||||||||||||||||||
239 | - | |||||||||||||||||||||||||||||||
240 | - | |||||||||||||||||||||||||||||||
241 | - | |||||||||||||||||||||||||||||||
242 | - | |||||||||||||||||||||||||||||||
243 | int _rl_revert_all_at_newline = 0; | - | ||||||||||||||||||||||||||||||
244 | - | |||||||||||||||||||||||||||||||
245 | - | |||||||||||||||||||||||||||||||
246 | - | |||||||||||||||||||||||||||||||
247 | int _rl_echo_control_chars = 1; | - | ||||||||||||||||||||||||||||||
248 | - | |||||||||||||||||||||||||||||||
249 | - | |||||||||||||||||||||||||||||||
250 | - | |||||||||||||||||||||||||||||||
251 | int _rl_show_mode_in_prompt = 0; | - | ||||||||||||||||||||||||||||||
252 | - | |||||||||||||||||||||||||||||||
253 | - | |||||||||||||||||||||||||||||||
254 | - | |||||||||||||||||||||||||||||||
255 | - | |||||||||||||||||||||||||||||||
256 | int _rl_enable_bracketed_paste = 0; | - | ||||||||||||||||||||||||||||||
257 | int _rl_meta_flag = 0; | - | ||||||||||||||||||||||||||||||
258 | - | |||||||||||||||||||||||||||||||
259 | - | |||||||||||||||||||||||||||||||
260 | - | |||||||||||||||||||||||||||||||
261 | int | - | ||||||||||||||||||||||||||||||
262 | rl_set_prompt (const char *prompt) | - | ||||||||||||||||||||||||||||||
263 | { | - | ||||||||||||||||||||||||||||||
264 | if (rl_prompt
never executed: free (rl_prompt); | 0 | ||||||||||||||||||||||||||||||
265 | rl_prompt = prompt
| 0 | ||||||||||||||||||||||||||||||
266 | ((void *)0) | - | ||||||||||||||||||||||||||||||
267 | ; | - | ||||||||||||||||||||||||||||||
268 | rl_display_prompt = rl_prompt
| 0 | ||||||||||||||||||||||||||||||
269 | - | |||||||||||||||||||||||||||||||
270 | rl_visible_prompt_length = rl_expand_prompt (rl_prompt); | - | ||||||||||||||||||||||||||||||
271 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||
272 | } | - | ||||||||||||||||||||||||||||||
273 | - | |||||||||||||||||||||||||||||||
274 | - | |||||||||||||||||||||||||||||||
275 | - | |||||||||||||||||||||||||||||||
276 | char * | - | ||||||||||||||||||||||||||||||
277 | readline (const char *prompt) | - | ||||||||||||||||||||||||||||||
278 | { | - | ||||||||||||||||||||||||||||||
279 | char *value; | - | ||||||||||||||||||||||||||||||
280 | - | |||||||||||||||||||||||||||||||
281 | - | |||||||||||||||||||||||||||||||
282 | - | |||||||||||||||||||||||||||||||
283 | - | |||||||||||||||||||||||||||||||
284 | - | |||||||||||||||||||||||||||||||
285 | if (rl_pending_input ==
| 0 | ||||||||||||||||||||||||||||||
286 | (-1)
| 0 | ||||||||||||||||||||||||||||||
287 | ) | - | ||||||||||||||||||||||||||||||
288 | { | - | ||||||||||||||||||||||||||||||
289 | rl_clear_pending_input (); | - | ||||||||||||||||||||||||||||||
290 | return never executed: ((char *)return ((char *) ((void *)0) ); never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
291 | ((void *)0) never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
292 | ); never executed: return ((char *) ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
293 | } | - | ||||||||||||||||||||||||||||||
294 | rl_set_prompt (prompt); | - | ||||||||||||||||||||||||||||||
295 | - | |||||||||||||||||||||||||||||||
296 | rl_initialize (); | - | ||||||||||||||||||||||||||||||
297 | if (rl_prep_term_function
| 0 | ||||||||||||||||||||||||||||||
298 | (* never executed: rl_prep_term_function) (_rl_meta_flag);(*rl_prep_term_function) (_rl_meta_flag); never executed: (*rl_prep_term_function) (_rl_meta_flag); | 0 | ||||||||||||||||||||||||||||||
299 | - | |||||||||||||||||||||||||||||||
300 | - | |||||||||||||||||||||||||||||||
301 | rl_set_signals (); | - | ||||||||||||||||||||||||||||||
302 | - | |||||||||||||||||||||||||||||||
303 | - | |||||||||||||||||||||||||||||||
304 | value = readline_internal (); | - | ||||||||||||||||||||||||||||||
305 | if (rl_deprep_term_function
| 0 | ||||||||||||||||||||||||||||||
306 | (* never executed: rl_deprep_term_function) ();(*rl_deprep_term_function) (); never executed: (*rl_deprep_term_function) (); | 0 | ||||||||||||||||||||||||||||||
307 | - | |||||||||||||||||||||||||||||||
308 | - | |||||||||||||||||||||||||||||||
309 | rl_clear_signals (); | - | ||||||||||||||||||||||||||||||
310 | return never executed: (value);return (value); never executed: return (value); | 0 | ||||||||||||||||||||||||||||||
311 | } | - | ||||||||||||||||||||||||||||||
312 | - | |||||||||||||||||||||||||||||||
313 | - | |||||||||||||||||||||||||||||||
314 | - | |||||||||||||||||||||||||||||||
315 | - | |||||||||||||||||||||||||||||||
316 | - | |||||||||||||||||||||||||||||||
317 | - | |||||||||||||||||||||||||||||||
318 | - | |||||||||||||||||||||||||||||||
319 | void | - | ||||||||||||||||||||||||||||||
320 | readline_internal_setup (void) | - | ||||||||||||||||||||||||||||||
321 | { | - | ||||||||||||||||||||||||||||||
322 | char *nprompt; | - | ||||||||||||||||||||||||||||||
323 | - | |||||||||||||||||||||||||||||||
324 | _rl_in_stream = rl_instream; | - | ||||||||||||||||||||||||||||||
325 | _rl_out_stream = rl_outstream; | - | ||||||||||||||||||||||||||||||
326 | - | |||||||||||||||||||||||||||||||
327 | - | |||||||||||||||||||||||||||||||
328 | - | |||||||||||||||||||||||||||||||
329 | if (_rl_enable_meta & (rl_readline_state & (0x0000004))
| 0 | ||||||||||||||||||||||||||||||
330 | _rl_enable_meta_key (); never executed: _rl_enable_meta_key (); | 0 | ||||||||||||||||||||||||||||||
331 | - | |||||||||||||||||||||||||||||||
332 | if (rl_startup_hook
| 0 | ||||||||||||||||||||||||||||||
333 | (* never executed: rl_startup_hook) ();(*rl_startup_hook) (); never executed: (*rl_startup_hook) (); | 0 | ||||||||||||||||||||||||||||||
334 | - | |||||||||||||||||||||||||||||||
335 | - | |||||||||||||||||||||||||||||||
336 | if (rl_editing_mode == 0
| 0 | ||||||||||||||||||||||||||||||
337 | rl_vi_insertion_mode (1, 'i'); never executed: rl_vi_insertion_mode (1, 'i'); | 0 | ||||||||||||||||||||||||||||||
338 | else | - | ||||||||||||||||||||||||||||||
339 | - | |||||||||||||||||||||||||||||||
340 | if (_rl_show_mode_in_prompt
| 0 | ||||||||||||||||||||||||||||||
341 | _rl_reset_prompt (); never executed: _rl_reset_prompt (); | 0 | ||||||||||||||||||||||||||||||
342 | - | |||||||||||||||||||||||||||||||
343 | - | |||||||||||||||||||||||||||||||
344 | - | |||||||||||||||||||||||||||||||
345 | - | |||||||||||||||||||||||||||||||
346 | if (_rl_echoing_p == 0
| 0 | ||||||||||||||||||||||||||||||
347 | { | - | ||||||||||||||||||||||||||||||
348 | if (rl_prompt
| 0 | ||||||||||||||||||||||||||||||
349 | { | - | ||||||||||||||||||||||||||||||
350 | nprompt = _rl_strip_prompt (rl_prompt); | - | ||||||||||||||||||||||||||||||
351 | fprintf (_rl_out_stream, "%s", nprompt); | - | ||||||||||||||||||||||||||||||
352 | fflush (_rl_out_stream); | - | ||||||||||||||||||||||||||||||
353 | xfree (nprompt); | - | ||||||||||||||||||||||||||||||
354 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
355 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
356 | else | - | ||||||||||||||||||||||||||||||
357 | { | - | ||||||||||||||||||||||||||||||
358 | if (rl_prompt
| 0 | ||||||||||||||||||||||||||||||
359 | rl_on_new_line_with_prompt (); never executed: rl_on_new_line_with_prompt (); | 0 | ||||||||||||||||||||||||||||||
360 | else | - | ||||||||||||||||||||||||||||||
361 | rl_on_new_line (); never executed: rl_on_new_line (); | 0 | ||||||||||||||||||||||||||||||
362 | (*rl_redisplay_function) (); | - | ||||||||||||||||||||||||||||||
363 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
364 | - | |||||||||||||||||||||||||||||||
365 | if (rl_pre_input_hook
| 0 | ||||||||||||||||||||||||||||||
366 | (* never executed: rl_pre_input_hook) ();(*rl_pre_input_hook) (); never executed: (*rl_pre_input_hook) (); | 0 | ||||||||||||||||||||||||||||||
367 | - | |||||||||||||||||||||||||||||||
368 | do { if (_rl_caught_signal
never executed: } while (0);_rl_signal_handler (_rl_caught_signal); | 0 | ||||||||||||||||||||||||||||||
369 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
370 | - | |||||||||||||||||||||||||||||||
371 | char * | - | ||||||||||||||||||||||||||||||
372 | readline_internal_teardown (int eof) | - | ||||||||||||||||||||||||||||||
373 | { | - | ||||||||||||||||||||||||||||||
374 | char *temp; | - | ||||||||||||||||||||||||||||||
375 | HIST_ENTRY *entry; | - | ||||||||||||||||||||||||||||||
376 | - | |||||||||||||||||||||||||||||||
377 | do { if (_rl_caught_signal
never executed: } while (0);_rl_signal_handler (_rl_caught_signal); | 0 | ||||||||||||||||||||||||||||||
378 | - | |||||||||||||||||||||||||||||||
379 | - | |||||||||||||||||||||||||||||||
380 | - | |||||||||||||||||||||||||||||||
381 | entry = current_history (); | - | ||||||||||||||||||||||||||||||
382 | - | |||||||||||||||||||||||||||||||
383 | if (entry
| 0 | ||||||||||||||||||||||||||||||
384 | { | - | ||||||||||||||||||||||||||||||
385 | temp = strcpy ((char *)xmalloc (1 + strlen (the_line)), (the_line)); | - | ||||||||||||||||||||||||||||||
386 | rl_revert_line (1, 0); | - | ||||||||||||||||||||||||||||||
387 | entry = replace_history_entry (where_history (), the_line, (histdata_t) | - | ||||||||||||||||||||||||||||||
388 | ((void *)0) | - | ||||||||||||||||||||||||||||||
389 | ); | - | ||||||||||||||||||||||||||||||
390 | _rl_free_history_entry (entry); | - | ||||||||||||||||||||||||||||||
391 | - | |||||||||||||||||||||||||||||||
392 | strcpy (the_line, temp); | - | ||||||||||||||||||||||||||||||
393 | xfree (temp); | - | ||||||||||||||||||||||||||||||
394 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
395 | - | |||||||||||||||||||||||||||||||
396 | if (_rl_revert_all_at_newline
| 0 | ||||||||||||||||||||||||||||||
397 | _rl_revert_all_lines (); never executed: _rl_revert_all_lines (); | 0 | ||||||||||||||||||||||||||||||
398 | - | |||||||||||||||||||||||||||||||
399 | - | |||||||||||||||||||||||||||||||
400 | - | |||||||||||||||||||||||||||||||
401 | if (rl_undo_list
| 0 | ||||||||||||||||||||||||||||||
402 | rl_free_undo_list (); never executed: rl_free_undo_list (); | 0 | ||||||||||||||||||||||||||||||
403 | - | |||||||||||||||||||||||||||||||
404 | - | |||||||||||||||||||||||||||||||
405 | - | |||||||||||||||||||||||||||||||
406 | - | |||||||||||||||||||||||||||||||
407 | _rl_disable_meta_key (); | - | ||||||||||||||||||||||||||||||
408 | - | |||||||||||||||||||||||||||||||
409 | - | |||||||||||||||||||||||||||||||
410 | _rl_set_insert_mode (1, 0); | - | ||||||||||||||||||||||||||||||
411 | - | |||||||||||||||||||||||||||||||
412 | return never executed: (eof ? (char *)return (eof ? (char *) ((void *)0) : strcpy ((char *)xmalloc (1 + strlen (the_line)), (the_line))); never executed: return (eof ? (char *) ((void *)0) : strcpy ((char *)xmalloc (1 + strlen (the_line)), (the_line))); | 0 | ||||||||||||||||||||||||||||||
413 | ((void *)0) never executed: return (eof ? (char *) ((void *)0) : strcpy ((char *)xmalloc (1 + strlen (the_line)), (the_line))); | 0 | ||||||||||||||||||||||||||||||
414 | : strcpy ((char *)xmalloc (1 + strlen (the_line)), (the_line))); never executed: return (eof ? (char *) ((void *)0) : strcpy ((char *)xmalloc (1 + strlen (the_line)), (the_line))); | 0 | ||||||||||||||||||||||||||||||
415 | } | - | ||||||||||||||||||||||||||||||
416 | - | |||||||||||||||||||||||||||||||
417 | void | - | ||||||||||||||||||||||||||||||
418 | _rl_internal_char_cleanup (void) | - | ||||||||||||||||||||||||||||||
419 | { | - | ||||||||||||||||||||||||||||||
420 | - | |||||||||||||||||||||||||||||||
421 | - | |||||||||||||||||||||||||||||||
422 | - | |||||||||||||||||||||||||||||||
423 | if (rl_editing_mode == 0
| 0 | ||||||||||||||||||||||||||||||
424 | rl_vi_check (); never executed: rl_vi_check (); | 0 | ||||||||||||||||||||||||||||||
425 | - | |||||||||||||||||||||||||||||||
426 | - | |||||||||||||||||||||||||||||||
427 | if (rl_num_chars_to_read
| 0 | ||||||||||||||||||||||||||||||
428 | { | - | ||||||||||||||||||||||||||||||
429 | (*rl_redisplay_function) (); | - | ||||||||||||||||||||||||||||||
430 | _rl_want_redisplay = 0; | - | ||||||||||||||||||||||||||||||
431 | rl_newline (1, '\n'); | - | ||||||||||||||||||||||||||||||
432 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
433 | - | |||||||||||||||||||||||||||||||
434 | if (rl_done == 0
| 0 | ||||||||||||||||||||||||||||||
435 | { | - | ||||||||||||||||||||||||||||||
436 | (*rl_redisplay_function) (); | - | ||||||||||||||||||||||||||||||
437 | _rl_want_redisplay = 0; | - | ||||||||||||||||||||||||||||||
438 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
439 | - | |||||||||||||||||||||||||||||||
440 | - | |||||||||||||||||||||||||||||||
441 | - | |||||||||||||||||||||||||||||||
442 | if (rl_erase_empty_line
| 0 | ||||||||||||||||||||||||||||||
443 | rl_point == 0
| 0 | ||||||||||||||||||||||||||||||
444 | _rl_erase_entire_line (); never executed: _rl_erase_entire_line (); | 0 | ||||||||||||||||||||||||||||||
445 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
446 | - | |||||||||||||||||||||||||||||||
447 | int | - | ||||||||||||||||||||||||||||||
448 | - | |||||||||||||||||||||||||||||||
449 | readline_internal_char (void) | - | ||||||||||||||||||||||||||||||
450 | - | |||||||||||||||||||||||||||||||
451 | - | |||||||||||||||||||||||||||||||
452 | - | |||||||||||||||||||||||||||||||
453 | { | - | ||||||||||||||||||||||||||||||
454 | static int lastc, eof_found; | - | ||||||||||||||||||||||||||||||
455 | int c, code, lk, r; | - | ||||||||||||||||||||||||||||||
456 | - | |||||||||||||||||||||||||||||||
457 | lastc = | - | ||||||||||||||||||||||||||||||
458 | (-1) | - | ||||||||||||||||||||||||||||||
459 | ; | - | ||||||||||||||||||||||||||||||
460 | - | |||||||||||||||||||||||||||||||
461 | - | |||||||||||||||||||||||||||||||
462 | - | |||||||||||||||||||||||||||||||
463 | - | |||||||||||||||||||||||||||||||
464 | - | |||||||||||||||||||||||||||||||
465 | - | |||||||||||||||||||||||||||||||
466 | lk = _rl_last_command_was_kill; | - | ||||||||||||||||||||||||||||||
467 | - | |||||||||||||||||||||||||||||||
468 | - | |||||||||||||||||||||||||||||||
469 | code = | - | ||||||||||||||||||||||||||||||
470 | __sigsetjmp ( | - | ||||||||||||||||||||||||||||||
471 | _rl_top_level | - | ||||||||||||||||||||||||||||||
472 | , | - | ||||||||||||||||||||||||||||||
473 | 0 | - | ||||||||||||||||||||||||||||||
474 | ) | - | ||||||||||||||||||||||||||||||
475 | ; | - | ||||||||||||||||||||||||||||||
476 | - | |||||||||||||||||||||||||||||||
477 | - | |||||||||||||||||||||||||||||||
478 | - | |||||||||||||||||||||||||||||||
479 | - | |||||||||||||||||||||||||||||||
480 | if (code
| 0 | ||||||||||||||||||||||||||||||
481 | { | - | ||||||||||||||||||||||||||||||
482 | (*rl_redisplay_function) (); | - | ||||||||||||||||||||||||||||||
483 | _rl_want_redisplay = 0; | - | ||||||||||||||||||||||||||||||
484 | - | |||||||||||||||||||||||||||||||
485 | - | |||||||||||||||||||||||||||||||
486 | - | |||||||||||||||||||||||||||||||
487 | - | |||||||||||||||||||||||||||||||
488 | if ((
| 0 | ||||||||||||||||||||||||||||||
489 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||
490 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
491 | - | |||||||||||||||||||||||||||||||
492 | if (rl_pending_input == 0
| 0 | ||||||||||||||||||||||||||||||
493 | { | - | ||||||||||||||||||||||||||||||
494 | - | |||||||||||||||||||||||||||||||
495 | _rl_reset_argument (); | - | ||||||||||||||||||||||||||||||
496 | rl_executing_keyseq[rl_key_sequence_length = 0] = '\0'; | - | ||||||||||||||||||||||||||||||
497 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
498 | - | |||||||||||||||||||||||||||||||
499 | (rl_readline_state |= (0x0000008)); | - | ||||||||||||||||||||||||||||||
500 | c = rl_read_key (); | - | ||||||||||||||||||||||||||||||
501 | (rl_readline_state &= ~(0x0000008)); | - | ||||||||||||||||||||||||||||||
502 | - | |||||||||||||||||||||||||||||||
503 | - | |||||||||||||||||||||||||||||||
504 | - | |||||||||||||||||||||||||||||||
505 | - | |||||||||||||||||||||||||||||||
506 | - | |||||||||||||||||||||||||||||||
507 | if (c == (-2)
| 0 | ||||||||||||||||||||||||||||||
508 | { | - | ||||||||||||||||||||||||||||||
509 | - | |||||||||||||||||||||||||||||||
510 | (rl_readline_state |= (0x2000000)); | - | ||||||||||||||||||||||||||||||
511 | return never executed: (rl_done = 1);return (rl_done = 1); never executed: return (rl_done = 1); | 0 | ||||||||||||||||||||||||||||||
512 | - | |||||||||||||||||||||||||||||||
513 | - | |||||||||||||||||||||||||||||||
514 | - | |||||||||||||||||||||||||||||||
515 | - | |||||||||||||||||||||||||||||||
516 | } | - | ||||||||||||||||||||||||||||||
517 | - | |||||||||||||||||||||||||||||||
518 | - | |||||||||||||||||||||||||||||||
519 | - | |||||||||||||||||||||||||||||||
520 | - | |||||||||||||||||||||||||||||||
521 | - | |||||||||||||||||||||||||||||||
522 | if (c ==
| 0 | ||||||||||||||||||||||||||||||
523 | (-1)
| 0 | ||||||||||||||||||||||||||||||
524 | && rl_end
| 0 | ||||||||||||||||||||||||||||||
525 | { | - | ||||||||||||||||||||||||||||||
526 | if ((
| 0 | ||||||||||||||||||||||||||||||
527 | { | - | ||||||||||||||||||||||||||||||
528 | do { if (_rl_caught_signal
never executed: } while (0);_rl_signal_handler (_rl_caught_signal); | 0 | ||||||||||||||||||||||||||||||
529 | if (rl_signal_event_hook
| 0 | ||||||||||||||||||||||||||||||
530 | (* never executed: rl_signal_event_hook) ();(*rl_signal_event_hook) (); never executed: (*rl_signal_event_hook) (); | 0 | ||||||||||||||||||||||||||||||
531 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
532 | - | |||||||||||||||||||||||||||||||
533 | - | |||||||||||||||||||||||||||||||
534 | if ((
| 0 | ||||||||||||||||||||||||||||||
535 | { | - | ||||||||||||||||||||||||||||||
536 | if (lastc == _rl_eof_char
| 0 | ||||||||||||||||||||||||||||||
537 | (-1)
| 0 | ||||||||||||||||||||||||||||||
538 | ) | - | ||||||||||||||||||||||||||||||
539 | rl_end = 0; never executed: rl_end = 0; | 0 | ||||||||||||||||||||||||||||||
540 | else | - | ||||||||||||||||||||||||||||||
541 | c = _rl_eof_char; never executed: c = _rl_eof_char; | 0 | ||||||||||||||||||||||||||||||
542 | } | - | ||||||||||||||||||||||||||||||
543 | else | - | ||||||||||||||||||||||||||||||
544 | c = '\n'; never executed: c = '\n'; | 0 | ||||||||||||||||||||||||||||||
545 | } | - | ||||||||||||||||||||||||||||||
546 | - | |||||||||||||||||||||||||||||||
547 | - | |||||||||||||||||||||||||||||||
548 | - | |||||||||||||||||||||||||||||||
549 | - | |||||||||||||||||||||||||||||||
550 | - | |||||||||||||||||||||||||||||||
551 | if (((c == _rl_eof_char
| 0 | ||||||||||||||||||||||||||||||
552 | (-1)
| 0 | ||||||||||||||||||||||||||||||
553 | ) && rl_end == 0
| 0 | ||||||||||||||||||||||||||||||
554 | { | - | ||||||||||||||||||||||||||||||
555 | - | |||||||||||||||||||||||||||||||
556 | (rl_readline_state |= (0x2000000)); | - | ||||||||||||||||||||||||||||||
557 | return never executed: (rl_done = 1);return (rl_done = 1); never executed: return (rl_done = 1); | 0 | ||||||||||||||||||||||||||||||
558 | - | |||||||||||||||||||||||||||||||
559 | - | |||||||||||||||||||||||||||||||
560 | - | |||||||||||||||||||||||||||||||
561 | - | |||||||||||||||||||||||||||||||
562 | } | - | ||||||||||||||||||||||||||||||
563 | - | |||||||||||||||||||||||||||||||
564 | lastc = c; | - | ||||||||||||||||||||||||||||||
565 | r = _rl_dispatch ((unsigned char)c, _rl_keymap); | - | ||||||||||||||||||||||||||||||
566 | do { if (_rl_caught_signal
never executed: } while (0);_rl_signal_handler (_rl_caught_signal); | 0 | ||||||||||||||||||||||||||||||
567 | - | |||||||||||||||||||||||||||||||
568 | - | |||||||||||||||||||||||||||||||
569 | - | |||||||||||||||||||||||||||||||
570 | - | |||||||||||||||||||||||||||||||
571 | if (rl_pending_input == 0
| 0 | ||||||||||||||||||||||||||||||
572 | _rl_last_command_was_kill = 0; never executed: _rl_last_command_was_kill = 0; | 0 | ||||||||||||||||||||||||||||||
573 | - | |||||||||||||||||||||||||||||||
574 | _rl_internal_char_cleanup (); | - | ||||||||||||||||||||||||||||||
575 | - | |||||||||||||||||||||||||||||||
576 | - | |||||||||||||||||||||||||||||||
577 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||
578 | - | |||||||||||||||||||||||||||||||
579 | - | |||||||||||||||||||||||||||||||
580 | - | |||||||||||||||||||||||||||||||
581 | - | |||||||||||||||||||||||||||||||
582 | - | |||||||||||||||||||||||||||||||
583 | } | - | ||||||||||||||||||||||||||||||
584 | - | |||||||||||||||||||||||||||||||
585 | - | |||||||||||||||||||||||||||||||
586 | static int | - | ||||||||||||||||||||||||||||||
587 | readline_internal_charloop (void) | - | ||||||||||||||||||||||||||||||
588 | { | - | ||||||||||||||||||||||||||||||
589 | int eof = 1; | - | ||||||||||||||||||||||||||||||
590 | - | |||||||||||||||||||||||||||||||
591 | while (rl_done == 0
| 0 | ||||||||||||||||||||||||||||||
592 | eof = readline_internal_char (); never executed: eof = readline_internal_char (); | 0 | ||||||||||||||||||||||||||||||
593 | return never executed: (eof);return (eof); never executed: return (eof); | 0 | ||||||||||||||||||||||||||||||
594 | } | - | ||||||||||||||||||||||||||||||
595 | - | |||||||||||||||||||||||||||||||
596 | - | |||||||||||||||||||||||||||||||
597 | - | |||||||||||||||||||||||||||||||
598 | - | |||||||||||||||||||||||||||||||
599 | - | |||||||||||||||||||||||||||||||
600 | static char * | - | ||||||||||||||||||||||||||||||
601 | readline_internal (void) | - | ||||||||||||||||||||||||||||||
602 | { | - | ||||||||||||||||||||||||||||||
603 | int eof; | - | ||||||||||||||||||||||||||||||
604 | - | |||||||||||||||||||||||||||||||
605 | readline_internal_setup (); | - | ||||||||||||||||||||||||||||||
606 | eof = readline_internal_charloop (); | - | ||||||||||||||||||||||||||||||
607 | return never executed: (readline_internal_teardown (eof));return (readline_internal_teardown (eof)); never executed: return (readline_internal_teardown (eof)); | 0 | ||||||||||||||||||||||||||||||
608 | } | - | ||||||||||||||||||||||||||||||
609 | - | |||||||||||||||||||||||||||||||
610 | void | - | ||||||||||||||||||||||||||||||
611 | _rl_init_line_state (void) | - | ||||||||||||||||||||||||||||||
612 | { | - | ||||||||||||||||||||||||||||||
613 | rl_point = rl_end = rl_mark = 0; | - | ||||||||||||||||||||||||||||||
614 | the_line = rl_line_buffer; | - | ||||||||||||||||||||||||||||||
615 | the_line[0] = 0; | - | ||||||||||||||||||||||||||||||
616 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
617 | - | |||||||||||||||||||||||||||||||
618 | void | - | ||||||||||||||||||||||||||||||
619 | _rl_set_the_line (void) | - | ||||||||||||||||||||||||||||||
620 | { | - | ||||||||||||||||||||||||||||||
621 | the_line = rl_line_buffer; | - | ||||||||||||||||||||||||||||||
622 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
623 | - | |||||||||||||||||||||||||||||||
624 | - | |||||||||||||||||||||||||||||||
625 | _rl_keyseq_cxt * | - | ||||||||||||||||||||||||||||||
626 | _rl_keyseq_cxt_alloc (void) | - | ||||||||||||||||||||||||||||||
627 | { | - | ||||||||||||||||||||||||||||||
628 | _rl_keyseq_cxt *cxt; | - | ||||||||||||||||||||||||||||||
629 | - | |||||||||||||||||||||||||||||||
630 | cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt)); | - | ||||||||||||||||||||||||||||||
631 | - | |||||||||||||||||||||||||||||||
632 | cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0; | - | ||||||||||||||||||||||||||||||
633 | - | |||||||||||||||||||||||||||||||
634 | cxt->okey = 0; | - | ||||||||||||||||||||||||||||||
635 | cxt->ocxt = _rl_kscxt; | - | ||||||||||||||||||||||||||||||
636 | cxt->childval = 42; | - | ||||||||||||||||||||||||||||||
637 | - | |||||||||||||||||||||||||||||||
638 | return never executed: cxt;return cxt; never executed: return cxt; | 0 | ||||||||||||||||||||||||||||||
639 | } | - | ||||||||||||||||||||||||||||||
640 | - | |||||||||||||||||||||||||||||||
641 | void | - | ||||||||||||||||||||||||||||||
642 | _rl_keyseq_cxt_dispose (_rl_keyseq_cxt *cxt) | - | ||||||||||||||||||||||||||||||
643 | { | - | ||||||||||||||||||||||||||||||
644 | xfree (cxt); | - | ||||||||||||||||||||||||||||||
645 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
646 | - | |||||||||||||||||||||||||||||||
647 | void | - | ||||||||||||||||||||||||||||||
648 | _rl_keyseq_chain_dispose (void) | - | ||||||||||||||||||||||||||||||
649 | { | - | ||||||||||||||||||||||||||||||
650 | _rl_keyseq_cxt *cxt; | - | ||||||||||||||||||||||||||||||
651 | - | |||||||||||||||||||||||||||||||
652 | while (_rl_kscxt
| 0 | ||||||||||||||||||||||||||||||
653 | { | - | ||||||||||||||||||||||||||||||
654 | cxt = _rl_kscxt; | - | ||||||||||||||||||||||||||||||
655 | _rl_kscxt = _rl_kscxt->ocxt; | - | ||||||||||||||||||||||||||||||
656 | _rl_keyseq_cxt_dispose (cxt); | - | ||||||||||||||||||||||||||||||
657 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
658 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
659 | - | |||||||||||||||||||||||||||||||
660 | - | |||||||||||||||||||||||||||||||
661 | static int | - | ||||||||||||||||||||||||||||||
662 | _rl_subseq_getchar (int key) | - | ||||||||||||||||||||||||||||||
663 | { | - | ||||||||||||||||||||||||||||||
664 | int k; | - | ||||||||||||||||||||||||||||||
665 | - | |||||||||||||||||||||||||||||||
666 | if (key == (('[') & 0x1f)
| 0 | ||||||||||||||||||||||||||||||
667 | ( never executed: rl_readline_state |= (0x0000010));(rl_readline_state |= (0x0000010)); never executed: (rl_readline_state |= (0x0000010)); | 0 | ||||||||||||||||||||||||||||||
668 | (rl_readline_state |= (0x0000040)); | - | ||||||||||||||||||||||||||||||
669 | k = rl_read_key (); | - | ||||||||||||||||||||||||||||||
670 | (rl_readline_state &= ~(0x0000040)); | - | ||||||||||||||||||||||||||||||
671 | if (key == (('[') & 0x1f)
| 0 | ||||||||||||||||||||||||||||||
672 | ( never executed: rl_readline_state &= ~(0x0000010));(rl_readline_state &= ~(0x0000010)); never executed: (rl_readline_state &= ~(0x0000010)); | 0 | ||||||||||||||||||||||||||||||
673 | - | |||||||||||||||||||||||||||||||
674 | return never executed: k;return k; never executed: return k; | 0 | ||||||||||||||||||||||||||||||
675 | } | - | ||||||||||||||||||||||||||||||
676 | - | |||||||||||||||||||||||||||||||
677 | - | |||||||||||||||||||||||||||||||
678 | int | - | ||||||||||||||||||||||||||||||
679 | _rl_dispatch_callback (_rl_keyseq_cxt *cxt) | - | ||||||||||||||||||||||||||||||
680 | { | - | ||||||||||||||||||||||||||||||
681 | int nkey, r; | - | ||||||||||||||||||||||||||||||
682 | - | |||||||||||||||||||||||||||||||
683 | - | |||||||||||||||||||||||||||||||
684 | - | |||||||||||||||||||||||||||||||
685 | - | |||||||||||||||||||||||||||||||
686 | - | |||||||||||||||||||||||||||||||
687 | - | |||||||||||||||||||||||||||||||
688 | if ((
| 0 | ||||||||||||||||||||||||||||||
689 | { | - | ||||||||||||||||||||||||||||||
690 | nkey = _rl_subseq_getchar (cxt->okey); | - | ||||||||||||||||||||||||||||||
691 | if (nkey < 0
| 0 | ||||||||||||||||||||||||||||||
692 | { | - | ||||||||||||||||||||||||||||||
693 | _rl_abort_internal (); | - | ||||||||||||||||||||||||||||||
694 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
695 | } | - | ||||||||||||||||||||||||||||||
696 | r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg); | - | ||||||||||||||||||||||||||||||
697 | cxt->flags |= 0x01; | - | ||||||||||||||||||||||||||||||
698 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
699 | else | - | ||||||||||||||||||||||||||||||
700 | r = cxt->childval; never executed: r = cxt->childval; | 0 | ||||||||||||||||||||||||||||||
701 | - | |||||||||||||||||||||||||||||||
702 | - | |||||||||||||||||||||||||||||||
703 | if (r != -3
| 0 | ||||||||||||||||||||||||||||||
704 | r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & 0x02)); never executed: r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & 0x02)); | 0 | ||||||||||||||||||||||||||||||
705 | - | |||||||||||||||||||||||||||||||
706 | do { if (_rl_caught_signal
never executed: } while (0);_rl_signal_handler (_rl_caught_signal); | 0 | ||||||||||||||||||||||||||||||
707 | - | |||||||||||||||||||||||||||||||
708 | if (r >= 0
| 0 | ||||||||||||||||||||||||||||||
709 | { | - | ||||||||||||||||||||||||||||||
710 | _rl_keyseq_chain_dispose (); | - | ||||||||||||||||||||||||||||||
711 | (rl_readline_state &= ~(0x0200000)); | - | ||||||||||||||||||||||||||||||
712 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||
713 | } | - | ||||||||||||||||||||||||||||||
714 | - | |||||||||||||||||||||||||||||||
715 | if (r != -3
| 0 | ||||||||||||||||||||||||||||||
716 | _rl_kscxt = cxt->ocxt; never executed: _rl_kscxt = cxt->ocxt; | 0 | ||||||||||||||||||||||||||||||
717 | if (_rl_kscxt
| 0 | ||||||||||||||||||||||||||||||
718 | _rl_kscxt->childval = r; never executed: _rl_kscxt->childval = r; | 0 | ||||||||||||||||||||||||||||||
719 | if (r != -3
| 0 | ||||||||||||||||||||||||||||||
720 | _rl_keyseq_cxt_dispose (cxt); never executed: _rl_keyseq_cxt_dispose (cxt); | 0 | ||||||||||||||||||||||||||||||
721 | - | |||||||||||||||||||||||||||||||
722 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||
723 | } | - | ||||||||||||||||||||||||||||||
724 | - | |||||||||||||||||||||||||||||||
725 | - | |||||||||||||||||||||||||||||||
726 | - | |||||||||||||||||||||||||||||||
727 | - | |||||||||||||||||||||||||||||||
728 | - | |||||||||||||||||||||||||||||||
729 | int | - | ||||||||||||||||||||||||||||||
730 | _rl_dispatch (register int key, Keymap map) | - | ||||||||||||||||||||||||||||||
731 | { | - | ||||||||||||||||||||||||||||||
732 | _rl_dispatching_keymap = map; | - | ||||||||||||||||||||||||||||||
733 | return never executed: _rl_dispatch_subseq (key, map, 0);return _rl_dispatch_subseq (key, map, 0); never executed: return _rl_dispatch_subseq (key, map, 0); | 0 | ||||||||||||||||||||||||||||||
734 | } | - | ||||||||||||||||||||||||||||||
735 | - | |||||||||||||||||||||||||||||||
736 | int | - | ||||||||||||||||||||||||||||||
737 | _rl_dispatch_subseq (register int key, Keymap map, int got_subseq) | - | ||||||||||||||||||||||||||||||
738 | { | - | ||||||||||||||||||||||||||||||
739 | int r, newkey; | - | ||||||||||||||||||||||||||||||
740 | char *macro; | - | ||||||||||||||||||||||||||||||
741 | rl_command_func_t *func; | - | ||||||||||||||||||||||||||||||
742 | - | |||||||||||||||||||||||||||||||
743 | _rl_keyseq_cxt *cxt; | - | ||||||||||||||||||||||||||||||
744 | - | |||||||||||||||||||||||||||||||
745 | - | |||||||||||||||||||||||||||||||
746 | if (((
| 0 | ||||||||||||||||||||||||||||||
747 | { | - | ||||||||||||||||||||||||||||||
748 | if (map[(('[') & 0x1f)].type == 1
| 0 | ||||||||||||||||||||||||||||||
749 | { | - | ||||||||||||||||||||||||||||||
750 | if ((
| 0 | ||||||||||||||||||||||||||||||
751 | _rl_add_macro_char ((('[') & 0x1f)); never executed: _rl_add_macro_char ((('[') & 0x1f)); | 0 | ||||||||||||||||||||||||||||||
752 | do { if (rl_key_sequence_length + 2 >= _rl_executing_keyseq_size
never executed: } while (0);;end of block | 0 | ||||||||||||||||||||||||||||||
753 | rl_executing_keyseq[rl_key_sequence_length++] = (('[') & 0x1f); | - | ||||||||||||||||||||||||||||||
754 | map = (Keymap)(map[(('[') & 0x1f)].function); | - | ||||||||||||||||||||||||||||||
755 | key = ((key) & (~0x080)); | - | ||||||||||||||||||||||||||||||
756 | return never executed: (_rl_dispatch (key, map));return (_rl_dispatch (key, map)); never executed: return (_rl_dispatch (key, map)); | 0 | ||||||||||||||||||||||||||||||
757 | } | - | ||||||||||||||||||||||||||||||
758 | else | - | ||||||||||||||||||||||||||||||
759 | rl_ding (); never executed: rl_ding (); | 0 | ||||||||||||||||||||||||||||||
760 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||
761 | } | - | ||||||||||||||||||||||||||||||
762 | - | |||||||||||||||||||||||||||||||
763 | if ((
| 0 | ||||||||||||||||||||||||||||||
764 | _rl_add_macro_char (key); never executed: _rl_add_macro_char (key); | 0 | ||||||||||||||||||||||||||||||
765 | - | |||||||||||||||||||||||||||||||
766 | r = 0; | - | ||||||||||||||||||||||||||||||
767 | switch (map[key].type) | - | ||||||||||||||||||||||||||||||
768 | { | - | ||||||||||||||||||||||||||||||
769 | case never executed: 0:case 0: never executed: case 0: | 0 | ||||||||||||||||||||||||||||||
770 | func = map[key].function; | - | ||||||||||||||||||||||||||||||
771 | if (func
| 0 | ||||||||||||||||||||||||||||||
772 | { | - | ||||||||||||||||||||||||||||||
773 | - | |||||||||||||||||||||||||||||||
774 | if (func == rl_do_lowercase_version
| 0 | ||||||||||||||||||||||||||||||
775 | - | |||||||||||||||||||||||||||||||
776 | return never executed: (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
777 | ((*__ctype_b_loc ())[(int) (( never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
778 | (unsigned char)(unsigned char)key never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
779 | ))] & (unsigned short int) _ISupper) never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
780 | )) ? never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
781 | (__extension__ ({ int __res; if (sizeof (
never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
782 | (unsigned char)(unsigned char)key
never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
783 | ) > 1
never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
784 | (unsigned char)(unsigned char)key
never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
785 | )
never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
786 | (unsigned char)(unsigned char)key never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
787 | ); __res = __c < -128
never executed: else __res = tolower (end of block never executed: __res = tolower ( (unsigned char)(unsigned char)key ); never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
788 | (unsigned char)(unsigned char)key never executed: __res = tolower ( (unsigned char)(unsigned char)key ); never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
789 | ); never executed: } else __res = (*__ctype_tolower_loc ())[(int) (__res = tolower ( (unsigned char)(unsigned char)key ); never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
790 | (unsigned char)(unsigned char)key never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
791 | )]; never executed: __res; })) __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
792 | : ((unsigned char)key)), map)); never executed: return (_rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned ch...__c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map)); | 0 | ||||||||||||||||||||||||||||||
793 | - | |||||||||||||||||||||||||||||||
794 | rl_executing_keymap = map; | - | ||||||||||||||||||||||||||||||
795 | rl_executing_key = key; | - | ||||||||||||||||||||||||||||||
796 | - | |||||||||||||||||||||||||||||||
797 | do { if (rl_key_sequence_length + 2 >= _rl_executing_keyseq_size
never executed: } while (0);;end of block | 0 | ||||||||||||||||||||||||||||||
798 | rl_executing_keyseq[rl_key_sequence_length++] = key; | - | ||||||||||||||||||||||||||||||
799 | rl_executing_keyseq[rl_key_sequence_length] = '\0'; | - | ||||||||||||||||||||||||||||||
800 | - | |||||||||||||||||||||||||||||||
801 | rl_dispatching = 1; | - | ||||||||||||||||||||||||||||||
802 | (rl_readline_state |= (0x0000020)); | - | ||||||||||||||||||||||||||||||
803 | r = (*func) (rl_numeric_arg * rl_arg_sign, key); | - | ||||||||||||||||||||||||||||||
804 | (rl_readline_state &= ~(0x0000020)); | - | ||||||||||||||||||||||||||||||
805 | rl_dispatching = 0; | - | ||||||||||||||||||||||||||||||
806 | - | |||||||||||||||||||||||||||||||
807 | - | |||||||||||||||||||||||||||||||
808 | - | |||||||||||||||||||||||||||||||
809 | - | |||||||||||||||||||||||||||||||
810 | if (rl_pending_input == 0
| 0 | ||||||||||||||||||||||||||||||
811 | rl_last_func = map[key].function; never executed: rl_last_func = map[key].function; | 0 | ||||||||||||||||||||||||||||||
812 | - | |||||||||||||||||||||||||||||||
813 | do { if (_rl_caught_signal
never executed: } while (0);_rl_signal_handler (_rl_caught_signal); | 0 | ||||||||||||||||||||||||||||||
814 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
815 | else if (map[257 -1].function
| 0 | ||||||||||||||||||||||||||||||
816 | { | - | ||||||||||||||||||||||||||||||
817 | - | |||||||||||||||||||||||||||||||
818 | - | |||||||||||||||||||||||||||||||
819 | - | |||||||||||||||||||||||||||||||
820 | if ((
| 0 | ||||||||||||||||||||||||||||||
821 | _rl_prev_macro_key (); never executed: _rl_prev_macro_key (); | 0 | ||||||||||||||||||||||||||||||
822 | else | - | ||||||||||||||||||||||||||||||
823 | _rl_unget_char (key); never executed: _rl_unget_char (key); | 0 | ||||||||||||||||||||||||||||||
824 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||
825 | } | - | ||||||||||||||||||||||||||||||
826 | else if (got_subseq
| 0 | ||||||||||||||||||||||||||||||
827 | { | - | ||||||||||||||||||||||||||||||
828 | - | |||||||||||||||||||||||||||||||
829 | - | |||||||||||||||||||||||||||||||
830 | - | |||||||||||||||||||||||||||||||
831 | - | |||||||||||||||||||||||||||||||
832 | if ((
| 0 | ||||||||||||||||||||||||||||||
833 | _rl_prev_macro_key (); never executed: _rl_prev_macro_key (); | 0 | ||||||||||||||||||||||||||||||
834 | else | - | ||||||||||||||||||||||||||||||
835 | _rl_unget_char (key); never executed: _rl_unget_char (key); | 0 | ||||||||||||||||||||||||||||||
836 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
837 | } | - | ||||||||||||||||||||||||||||||
838 | else | - | ||||||||||||||||||||||||||||||
839 | { | - | ||||||||||||||||||||||||||||||
840 | - | |||||||||||||||||||||||||||||||
841 | (rl_readline_state &= ~(0x0200000)); | - | ||||||||||||||||||||||||||||||
842 | _rl_keyseq_chain_dispose (); | - | ||||||||||||||||||||||||||||||
843 | - | |||||||||||||||||||||||||||||||
844 | _rl_abort_internal (); | - | ||||||||||||||||||||||||||||||
845 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
846 | } | - | ||||||||||||||||||||||||||||||
847 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||
848 | - | |||||||||||||||||||||||||||||||
849 | case never executed: 1:case 1: never executed: case 1: | 0 | ||||||||||||||||||||||||||||||
850 | if (map[key].function != 0
| 0 | ||||||||||||||||||||||||||||||
851 | { | - | ||||||||||||||||||||||||||||||
852 | if (rl_editing_mode == 0
| 0 | ||||||||||||||||||||||||||||||
853 | ((
| 0 | ||||||||||||||||||||||||||||||
854 | _rl_pushed_input_available () == 0
| 0 | ||||||||||||||||||||||||||||||
855 | _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0
| 0 | ||||||||||||||||||||||||||||||
856 | return never executed: (_rl_dispatch (257 -1, (Keymap)(map[key].function)));return (_rl_dispatch (257 -1, (Keymap)(map[key].function))); never executed: return (_rl_dispatch (257 -1, (Keymap)(map[key].function))); | 0 | ||||||||||||||||||||||||||||||
857 | - | |||||||||||||||||||||||||||||||
858 | - | |||||||||||||||||||||||||||||||
859 | - | |||||||||||||||||||||||||||||||
860 | if (rl_editing_mode == 0
| 0 | ||||||||||||||||||||||||||||||
861 | ((
| 0 | ||||||||||||||||||||||||||||||
862 | ((
| 0 | ||||||||||||||||||||||||||||||
863 | _rl_pushed_input_available () == 0
| 0 | ||||||||||||||||||||||||||||||
864 | _rl_input_queued ((_rl_keyseq_timeout > 0) ? _rl_keyseq_timeout*1000 : 0) == 0
| 0 | ||||||||||||||||||||||||||||||
865 | return never executed: (_rl_dispatch (257 -1, (Keymap)(map[key].function)));return (_rl_dispatch (257 -1, (Keymap)(map[key].function))); never executed: return (_rl_dispatch (257 -1, (Keymap)(map[key].function))); | 0 | ||||||||||||||||||||||||||||||
866 | - | |||||||||||||||||||||||||||||||
867 | - | |||||||||||||||||||||||||||||||
868 | do { if (rl_key_sequence_length + 2 >= _rl_executing_keyseq_size
never executed: } while (0);;end of block | 0 | ||||||||||||||||||||||||||||||
869 | rl_executing_keyseq[rl_key_sequence_length++] = key; | - | ||||||||||||||||||||||||||||||
870 | _rl_dispatching_keymap = (Keymap)(map[key].function); | - | ||||||||||||||||||||||||||||||
871 | if (_rl_vi_redoing
| 0 | ||||||||||||||||||||||||||||||
872 | map[257 -1].function != 0
| 0 | ||||||||||||||||||||||||||||||
873 | return never executed: (_rl_subseq_result (-2, map, key, got_subseq));return (_rl_subseq_result (-2, map, key, got_subseq)); never executed: return (_rl_subseq_result (-2, map, key, got_subseq)); | 0 | ||||||||||||||||||||||||||||||
874 | - | |||||||||||||||||||||||||||||||
875 | if ((
| 0 | ||||||||||||||||||||||||||||||
876 | { | - | ||||||||||||||||||||||||||||||
877 | - | |||||||||||||||||||||||||||||||
878 | - | |||||||||||||||||||||||||||||||
879 | - | |||||||||||||||||||||||||||||||
880 | - | |||||||||||||||||||||||||||||||
881 | r = (
| 0 | ||||||||||||||||||||||||||||||
882 | cxt = _rl_keyseq_cxt_alloc (); | - | ||||||||||||||||||||||||||||||
883 | - | |||||||||||||||||||||||||||||||
884 | if (got_subseq
| 0 | ||||||||||||||||||||||||||||||
885 | cxt->flags |= 0x02; never executed: cxt->flags |= 0x02; | 0 | ||||||||||||||||||||||||||||||
886 | cxt->okey = key; | - | ||||||||||||||||||||||||||||||
887 | cxt->oldmap = map; | - | ||||||||||||||||||||||||||||||
888 | cxt->dmap = _rl_dispatching_keymap; | - | ||||||||||||||||||||||||||||||
889 | cxt->subseq_arg = got_subseq
| 0 | ||||||||||||||||||||||||||||||
890 | - | |||||||||||||||||||||||||||||||
891 | (rl_readline_state |= (0x0200000)); | - | ||||||||||||||||||||||||||||||
892 | _rl_kscxt = cxt; | - | ||||||||||||||||||||||||||||||
893 | - | |||||||||||||||||||||||||||||||
894 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||
895 | } | - | ||||||||||||||||||||||||||||||
896 | - | |||||||||||||||||||||||||||||||
897 | - | |||||||||||||||||||||||||||||||
898 | - | |||||||||||||||||||||||||||||||
899 | - | |||||||||||||||||||||||||||||||
900 | - | |||||||||||||||||||||||||||||||
901 | - | |||||||||||||||||||||||||||||||
902 | - | |||||||||||||||||||||||||||||||
903 | if (_rl_keyseq_timeout > 0
| 0 | ||||||||||||||||||||||||||||||
904 | ((
| 0 | ||||||||||||||||||||||||||||||
905 | _rl_pushed_input_available () == 0
| 0 | ||||||||||||||||||||||||||||||
906 | _rl_dispatching_keymap[257 -1].function
| 0 | ||||||||||||||||||||||||||||||
907 | _rl_input_queued (_rl_keyseq_timeout*1000) == 0
| 0 | ||||||||||||||||||||||||||||||
908 | return never executed: (_rl_subseq_result (-2, map, key, got_subseq));return (_rl_subseq_result (-2, map, key, got_subseq)); never executed: return (_rl_subseq_result (-2, map, key, got_subseq)); | 0 | ||||||||||||||||||||||||||||||
909 | - | |||||||||||||||||||||||||||||||
910 | newkey = _rl_subseq_getchar (key); | - | ||||||||||||||||||||||||||||||
911 | if (newkey < 0
| 0 | ||||||||||||||||||||||||||||||
912 | { | - | ||||||||||||||||||||||||||||||
913 | _rl_abort_internal (); | - | ||||||||||||||||||||||||||||||
914 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
915 | } | - | ||||||||||||||||||||||||||||||
916 | - | |||||||||||||||||||||||||||||||
917 | r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[257 -1].function); | - | ||||||||||||||||||||||||||||||
918 | return never executed: _rl_subseq_result (r, map, key, got_subseq);return _rl_subseq_result (r, map, key, got_subseq); never executed: return _rl_subseq_result (r, map, key, got_subseq); | 0 | ||||||||||||||||||||||||||||||
919 | } | - | ||||||||||||||||||||||||||||||
920 | else | - | ||||||||||||||||||||||||||||||
921 | { | - | ||||||||||||||||||||||||||||||
922 | _rl_abort_internal (); | - | ||||||||||||||||||||||||||||||
923 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
924 | } | - | ||||||||||||||||||||||||||||||
925 | break; dead code: break; | - | ||||||||||||||||||||||||||||||
926 | - | |||||||||||||||||||||||||||||||
927 | case never executed: 2:case 2: never executed: case 2: | 0 | ||||||||||||||||||||||||||||||
928 | if (map[key].function != 0
| 0 | ||||||||||||||||||||||||||||||
929 | { | - | ||||||||||||||||||||||||||||||
930 | rl_executing_keyseq[rl_key_sequence_length] = '\0'; | - | ||||||||||||||||||||||||||||||
931 | macro = strcpy ((char *)xmalloc (1 + strlen ((char *)map[key].function)), ((char *)map[key].function)); | - | ||||||||||||||||||||||||||||||
932 | _rl_with_macro_input (macro); | - | ||||||||||||||||||||||||||||||
933 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||
934 | } | - | ||||||||||||||||||||||||||||||
935 | break; never executed: break; | 0 | ||||||||||||||||||||||||||||||
936 | } | - | ||||||||||||||||||||||||||||||
937 | - | |||||||||||||||||||||||||||||||
938 | - | |||||||||||||||||||||||||||||||
939 | if (rl_editing_mode == 0
| 0 | ||||||||||||||||||||||||||||||
940 | key != 257 -1
| 0 | ||||||||||||||||||||||||||||||
941 | _rl_dispatching_keymap == vi_movement_keymap
| 0 | ||||||||||||||||||||||||||||||
942 | _rl_vi_textmod_command (key)
| 0 | ||||||||||||||||||||||||||||||
943 | _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); never executed: _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); | 0 | ||||||||||||||||||||||||||||||
944 | - | |||||||||||||||||||||||||||||||
945 | - | |||||||||||||||||||||||||||||||
946 | return never executed: (r);return (r); never executed: return (r); | 0 | ||||||||||||||||||||||||||||||
947 | } | - | ||||||||||||||||||||||||||||||
948 | - | |||||||||||||||||||||||||||||||
949 | static int | - | ||||||||||||||||||||||||||||||
950 | _rl_subseq_result (int r, Keymap map, int key, int got_subseq) | - | ||||||||||||||||||||||||||||||
951 | { | - | ||||||||||||||||||||||||||||||
952 | Keymap m; | - | ||||||||||||||||||||||||||||||
953 | int type, nt; | - | ||||||||||||||||||||||||||||||
954 | rl_command_func_t *func, *nf; | - | ||||||||||||||||||||||||||||||
955 | - | |||||||||||||||||||||||||||||||
956 | if (r == -2
| 0 | ||||||||||||||||||||||||||||||
957 | - | |||||||||||||||||||||||||||||||
958 | - | |||||||||||||||||||||||||||||||
959 | - | |||||||||||||||||||||||||||||||
960 | - | |||||||||||||||||||||||||||||||
961 | - | |||||||||||||||||||||||||||||||
962 | { | - | ||||||||||||||||||||||||||||||
963 | m = _rl_dispatching_keymap; | - | ||||||||||||||||||||||||||||||
964 | type = m[257 -1].type; | - | ||||||||||||||||||||||||||||||
965 | func = m[257 -1].function; | - | ||||||||||||||||||||||||||||||
966 | if (type == 0
| 0 | ||||||||||||||||||||||||||||||
967 | r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
968 | ((*__ctype_b_loc ())[(int) (( never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
969 | (unsigned char)(unsigned char)key never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
970 | ))] & (unsigned short int) _ISupper) never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
971 | )) ? never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
972 | (__extension__ ({ int __res; if (sizeof (
never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
973 | (unsigned char)(unsigned char)key
never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
974 | ) > 1
never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
975 | (unsigned char)(unsigned char)key
never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
976 | )
never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
977 | (unsigned char)(unsigned char)key never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
978 | ); __res = __c < -128
never executed: else __res = tolower (end of block never executed: __res = tolower ( (unsigned char)(unsigned char)key ); never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
979 | (unsigned char)(unsigned char)key never executed: __res = tolower ( (unsigned char)(unsigned char)key ); never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
980 | ); never executed: } else __res = (*__ctype_tolower_loc ())[(int) (__res = tolower ( (unsigned char)(unsigned char)key ); never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
981 | (unsigned char)(unsigned char)key never executed: __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
982 | )]; never executed: __res; })) __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
983 | : ((unsigned char)key)), map); never executed: r = _rl_dispatch (((((unsigned char)((unsigned char)key) == ((unsigned char)key)) && (1 && ((*__ctype_b_loc ())[(int) (( (unsigned char)(unsigned char)key ))] & (unsigned short int) _ISupper) )) ? (__extension__ ({ int __res; if (sizeof ( (unsigned char)(... __c < -128 || __c > 255 ? __c : (*__ctype_tolower_loc ())[__c]; } else __res = tolower ( (unsigned char)(unsigned char)key ); } else __res = (*__ctype_tolower_loc ())[(int) ( (unsigned char)(unsigned char)key )]; __res; })) : ((unsigned char)key)), map); | 0 | ||||||||||||||||||||||||||||||
984 | else if (type == 0
| 0 | ||||||||||||||||||||||||||||||
985 | { | - | ||||||||||||||||||||||||||||||
986 | - | |||||||||||||||||||||||||||||||
987 | - | |||||||||||||||||||||||||||||||
988 | - | |||||||||||||||||||||||||||||||
989 | - | |||||||||||||||||||||||||||||||
990 | - | |||||||||||||||||||||||||||||||
991 | nt = m[key].type; | - | ||||||||||||||||||||||||||||||
992 | nf = m[key].function; | - | ||||||||||||||||||||||||||||||
993 | - | |||||||||||||||||||||||||||||||
994 | m[key].type = type; | - | ||||||||||||||||||||||||||||||
995 | m[key].function = func; | - | ||||||||||||||||||||||||||||||
996 | - | |||||||||||||||||||||||||||||||
997 | _rl_dispatching_keymap = map; | - | ||||||||||||||||||||||||||||||
998 | r = _rl_dispatch_subseq (key, m, 0); | - | ||||||||||||||||||||||||||||||
999 | m[key].type = nt; | - | ||||||||||||||||||||||||||||||
1000 | m[key].function = nf; | - | ||||||||||||||||||||||||||||||
1001 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1002 | else | - | ||||||||||||||||||||||||||||||
1003 | - | |||||||||||||||||||||||||||||||
1004 | r = _rl_dispatch (257 -1, m); never executed: r = _rl_dispatch (257 -1, m); | 0 | ||||||||||||||||||||||||||||||
1005 | } | - | ||||||||||||||||||||||||||||||
1006 | else if (r
| 0 | ||||||||||||||||||||||||||||||
1007 | { | - | ||||||||||||||||||||||||||||||
1008 | - | |||||||||||||||||||||||||||||||
1009 | - | |||||||||||||||||||||||||||||||
1010 | - | |||||||||||||||||||||||||||||||
1011 | if ((
| 0 | ||||||||||||||||||||||||||||||
1012 | _rl_prev_macro_key (); never executed: _rl_prev_macro_key (); | 0 | ||||||||||||||||||||||||||||||
1013 | else | - | ||||||||||||||||||||||||||||||
1014 | _rl_unget_char (key); never executed: _rl_unget_char (key); | 0 | ||||||||||||||||||||||||||||||
1015 | _rl_dispatching_keymap = map; | - | ||||||||||||||||||||||||||||||
1016 | return never executed: -2;return -2; never executed: return -2; | 0 | ||||||||||||||||||||||||||||||
1017 | } | - | ||||||||||||||||||||||||||||||
1018 | else if (r < 0
| 0 | ||||||||||||||||||||||||||||||
1019 | { | - | ||||||||||||||||||||||||||||||
1020 | - | |||||||||||||||||||||||||||||||
1021 | if ((
| 0 | ||||||||||||||||||||||||||||||
1022 | _rl_prev_macro_key (); never executed: _rl_prev_macro_key (); | 0 | ||||||||||||||||||||||||||||||
1023 | else | - | ||||||||||||||||||||||||||||||
1024 | _rl_unget_char (key); never executed: _rl_unget_char (key); | 0 | ||||||||||||||||||||||||||||||
1025 | _rl_dispatching_keymap = map; | - | ||||||||||||||||||||||||||||||
1026 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
1027 | } | - | ||||||||||||||||||||||||||||||
1028 | - | |||||||||||||||||||||||||||||||
1029 | return never executed: r;return r; never executed: return r; | 0 | ||||||||||||||||||||||||||||||
1030 | } | - | ||||||||||||||||||||||||||||||
1031 | int | - | ||||||||||||||||||||||||||||||
1032 | rl_initialize (void) | - | ||||||||||||||||||||||||||||||
1033 | { | - | ||||||||||||||||||||||||||||||
1034 | - | |||||||||||||||||||||||||||||||
1035 | - | |||||||||||||||||||||||||||||||
1036 | if (rl_initialized == 0
| 0 | ||||||||||||||||||||||||||||||
1037 | { | - | ||||||||||||||||||||||||||||||
1038 | (rl_readline_state |= (0x0000001)); | - | ||||||||||||||||||||||||||||||
1039 | readline_initialize_everything (); | - | ||||||||||||||||||||||||||||||
1040 | (rl_readline_state &= ~(0x0000001)); | - | ||||||||||||||||||||||||||||||
1041 | rl_initialized++; | - | ||||||||||||||||||||||||||||||
1042 | (rl_readline_state |= (0x0000002)); | - | ||||||||||||||||||||||||||||||
1043 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1044 | else | - | ||||||||||||||||||||||||||||||
1045 | ( never executed: void)_rl_init_locale ();(void)_rl_init_locale (); never executed: (void)_rl_init_locale (); | 0 | ||||||||||||||||||||||||||||||
1046 | - | |||||||||||||||||||||||||||||||
1047 | - | |||||||||||||||||||||||||||||||
1048 | _rl_init_line_state (); | - | ||||||||||||||||||||||||||||||
1049 | - | |||||||||||||||||||||||||||||||
1050 | - | |||||||||||||||||||||||||||||||
1051 | rl_done = 0; | - | ||||||||||||||||||||||||||||||
1052 | (rl_readline_state &= ~(0x2000000)); | - | ||||||||||||||||||||||||||||||
1053 | - | |||||||||||||||||||||||||||||||
1054 | - | |||||||||||||||||||||||||||||||
1055 | _rl_start_using_history (); | - | ||||||||||||||||||||||||||||||
1056 | - | |||||||||||||||||||||||||||||||
1057 | - | |||||||||||||||||||||||||||||||
1058 | rl_reset_line_state (); | - | ||||||||||||||||||||||||||||||
1059 | - | |||||||||||||||||||||||||||||||
1060 | - | |||||||||||||||||||||||||||||||
1061 | rl_last_func = (rl_command_func_t *) | - | ||||||||||||||||||||||||||||||
1062 | ((void *)0) | - | ||||||||||||||||||||||||||||||
1063 | ; | - | ||||||||||||||||||||||||||||||
1064 | - | |||||||||||||||||||||||||||||||
1065 | - | |||||||||||||||||||||||||||||||
1066 | _rl_parsing_conditionalized_out = 0; | - | ||||||||||||||||||||||||||||||
1067 | - | |||||||||||||||||||||||||||||||
1068 | - | |||||||||||||||||||||||||||||||
1069 | if (rl_editing_mode == 0
| 0 | ||||||||||||||||||||||||||||||
1070 | _rl_vi_initialize_line (); never executed: _rl_vi_initialize_line (); | 0 | ||||||||||||||||||||||||||||||
1071 | - | |||||||||||||||||||||||||||||||
1072 | - | |||||||||||||||||||||||||||||||
1073 | - | |||||||||||||||||||||||||||||||
1074 | _rl_set_insert_mode (1, 1); | - | ||||||||||||||||||||||||||||||
1075 | - | |||||||||||||||||||||||||||||||
1076 | return never executed: 0;return 0; never executed: return 0; | 0 | ||||||||||||||||||||||||||||||
1077 | } | - | ||||||||||||||||||||||||||||||
1078 | static void | - | ||||||||||||||||||||||||||||||
1079 | readline_initialize_everything (void) | - | ||||||||||||||||||||||||||||||
1080 | { | - | ||||||||||||||||||||||||||||||
1081 | if (!rl_instream
| 0 | ||||||||||||||||||||||||||||||
1082 | rl_instream = never executed: rl_instream = stdin ; | 0 | ||||||||||||||||||||||||||||||
1083 | stdin never executed: rl_instream = stdin ; | 0 | ||||||||||||||||||||||||||||||
1084 | ; never executed: rl_instream = stdin ; | 0 | ||||||||||||||||||||||||||||||
1085 | - | |||||||||||||||||||||||||||||||
1086 | if (!rl_outstream
| 0 | ||||||||||||||||||||||||||||||
1087 | rl_outstream = never executed: rl_outstream = stdout ; | 0 | ||||||||||||||||||||||||||||||
1088 | stdout never executed: rl_outstream = stdout ; | 0 | ||||||||||||||||||||||||||||||
1089 | ; never executed: rl_outstream = stdout ; | 0 | ||||||||||||||||||||||||||||||
1090 | - | |||||||||||||||||||||||||||||||
1091 | - | |||||||||||||||||||||||||||||||
1092 | - | |||||||||||||||||||||||||||||||
1093 | - | |||||||||||||||||||||||||||||||
1094 | _rl_in_stream = rl_instream; | - | ||||||||||||||||||||||||||||||
1095 | _rl_out_stream = rl_outstream; | - | ||||||||||||||||||||||||||||||
1096 | - | |||||||||||||||||||||||||||||||
1097 | - | |||||||||||||||||||||||||||||||
1098 | if (rl_line_buffer == 0
| 0 | ||||||||||||||||||||||||||||||
1099 | rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = 256); never executed: rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = 256); | 0 | ||||||||||||||||||||||||||||||
1100 | - | |||||||||||||||||||||||||||||||
1101 | - | |||||||||||||||||||||||||||||||
1102 | if (rl_terminal_name == 0
| 0 | ||||||||||||||||||||||||||||||
1103 | rl_terminal_name = sh_get_env_value ("TERM"); never executed: rl_terminal_name = sh_get_env_value ("TERM"); | 0 | ||||||||||||||||||||||||||||||
1104 | _rl_init_terminal_io (rl_terminal_name); | - | ||||||||||||||||||||||||||||||
1105 | - | |||||||||||||||||||||||||||||||
1106 | - | |||||||||||||||||||||||||||||||
1107 | readline_default_bindings (); | - | ||||||||||||||||||||||||||||||
1108 | - | |||||||||||||||||||||||||||||||
1109 | - | |||||||||||||||||||||||||||||||
1110 | rl_initialize_funmap (); | - | ||||||||||||||||||||||||||||||
1111 | - | |||||||||||||||||||||||||||||||
1112 | - | |||||||||||||||||||||||||||||||
1113 | _rl_init_eightbit (); | - | ||||||||||||||||||||||||||||||
1114 | - | |||||||||||||||||||||||||||||||
1115 | - | |||||||||||||||||||||||||||||||
1116 | rl_read_init_file ((char *) | - | ||||||||||||||||||||||||||||||
1117 | ((void *)0) | - | ||||||||||||||||||||||||||||||
1118 | ); | - | ||||||||||||||||||||||||||||||
1119 | - | |||||||||||||||||||||||||||||||
1120 | - | |||||||||||||||||||||||||||||||
1121 | if (_rl_horizontal_scroll_mode
| 0 | ||||||||||||||||||||||||||||||
1122 | { | - | ||||||||||||||||||||||||||||||
1123 | _rl_screenwidth--; | - | ||||||||||||||||||||||||||||||
1124 | _rl_screenchars -= _rl_screenheight; | - | ||||||||||||||||||||||||||||||
1125 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1126 | - | |||||||||||||||||||||||||||||||
1127 | - | |||||||||||||||||||||||||||||||
1128 | - | |||||||||||||||||||||||||||||||
1129 | rl_set_keymap_from_edit_mode (); | - | ||||||||||||||||||||||||||||||
1130 | - | |||||||||||||||||||||||||||||||
1131 | - | |||||||||||||||||||||||||||||||
1132 | bind_arrow_keys (); | - | ||||||||||||||||||||||||||||||
1133 | - | |||||||||||||||||||||||||||||||
1134 | - | |||||||||||||||||||||||||||||||
1135 | - | |||||||||||||||||||||||||||||||
1136 | bind_bracketed_paste_prefix (); | - | ||||||||||||||||||||||||||||||
1137 | - | |||||||||||||||||||||||||||||||
1138 | - | |||||||||||||||||||||||||||||||
1139 | - | |||||||||||||||||||||||||||||||
1140 | if (rl_completer_word_break_characters == (char *)
| 0 | ||||||||||||||||||||||||||||||
1141 | ((void *)0)
| 0 | ||||||||||||||||||||||||||||||
1142 | ) | - | ||||||||||||||||||||||||||||||
1143 | rl_completer_word_break_characters = (char *)rl_basic_word_break_characters; never executed: rl_completer_word_break_characters = (char *)rl_basic_word_break_characters; | 0 | ||||||||||||||||||||||||||||||
1144 | - | |||||||||||||||||||||||||||||||
1145 | - | |||||||||||||||||||||||||||||||
1146 | if (_rl_colored_stats
| 0 | ||||||||||||||||||||||||||||||
1147 | _rl_parse_colors (); never executed: _rl_parse_colors (); | 0 | ||||||||||||||||||||||||||||||
1148 | - | |||||||||||||||||||||||||||||||
1149 | - | |||||||||||||||||||||||||||||||
1150 | rl_executing_keyseq = malloc (_rl_executing_keyseq_size = 16); | - | ||||||||||||||||||||||||||||||
1151 | if (rl_executing_keyseq
| 0 | ||||||||||||||||||||||||||||||
1152 | rl_executing_keyseq[0] = '\0'; never executed: rl_executing_keyseq[0] = '\0'; | 0 | ||||||||||||||||||||||||||||||
1153 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1154 | - | |||||||||||||||||||||||||||||||
1155 | - | |||||||||||||||||||||||||||||||
1156 | - | |||||||||||||||||||||||||||||||
1157 | - | |||||||||||||||||||||||||||||||
1158 | static void | - | ||||||||||||||||||||||||||||||
1159 | readline_default_bindings (void) | - | ||||||||||||||||||||||||||||||
1160 | { | - | ||||||||||||||||||||||||||||||
1161 | if (_rl_bind_stty_chars
| 0 | ||||||||||||||||||||||||||||||
1162 | rl_tty_set_default_bindings (_rl_keymap); never executed: rl_tty_set_default_bindings (_rl_keymap); | 0 | ||||||||||||||||||||||||||||||
1163 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1164 | - | |||||||||||||||||||||||||||||||
1165 | - | |||||||||||||||||||||||||||||||
1166 | - | |||||||||||||||||||||||||||||||
1167 | static void | - | ||||||||||||||||||||||||||||||
1168 | reset_default_bindings (void) | - | ||||||||||||||||||||||||||||||
1169 | { | - | ||||||||||||||||||||||||||||||
1170 | if (_rl_bind_stty_chars
| 0 | ||||||||||||||||||||||||||||||
1171 | { | - | ||||||||||||||||||||||||||||||
1172 | rl_tty_unset_default_bindings (_rl_keymap); | - | ||||||||||||||||||||||||||||||
1173 | rl_tty_set_default_bindings (_rl_keymap); | - | ||||||||||||||||||||||||||||||
1174 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1175 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1176 | - | |||||||||||||||||||||||||||||||
1177 | - | |||||||||||||||||||||||||||||||
1178 | static void | - | ||||||||||||||||||||||||||||||
1179 | bind_arrow_keys_internal (Keymap map) | - | ||||||||||||||||||||||||||||||
1180 | { | - | ||||||||||||||||||||||||||||||
1181 | Keymap xkeymap; | - | ||||||||||||||||||||||||||||||
1182 | - | |||||||||||||||||||||||||||||||
1183 | xkeymap = _rl_keymap; | - | ||||||||||||||||||||||||||||||
1184 | _rl_keymap = map; | - | ||||||||||||||||||||||||||||||
1185 | rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history); | - | ||||||||||||||||||||||||||||||
1186 | rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history); | - | ||||||||||||||||||||||||||||||
1187 | rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char); | - | ||||||||||||||||||||||||||||||
1188 | rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char); | - | ||||||||||||||||||||||||||||||
1189 | rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line); | - | ||||||||||||||||||||||||||||||
1190 | rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line); | - | ||||||||||||||||||||||||||||||
1191 | - | |||||||||||||||||||||||||||||||
1192 | rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history); | - | ||||||||||||||||||||||||||||||
1193 | rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history); | - | ||||||||||||||||||||||||||||||
1194 | rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char); | - | ||||||||||||||||||||||||||||||
1195 | rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char); | - | ||||||||||||||||||||||||||||||
1196 | rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line); | - | ||||||||||||||||||||||||||||||
1197 | rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line); | - | ||||||||||||||||||||||||||||||
1198 | - | |||||||||||||||||||||||||||||||
1199 | - | |||||||||||||||||||||||||||||||
1200 | rl_bind_keyseq_if_unbound ("\033[1;5C", rl_forward_word); | - | ||||||||||||||||||||||||||||||
1201 | rl_bind_keyseq_if_unbound ("\033[1;5D", rl_backward_word); | - | ||||||||||||||||||||||||||||||
1202 | rl_bind_keyseq_if_unbound ("\033[3;5~", rl_kill_word); | - | ||||||||||||||||||||||||||||||
1203 | - | |||||||||||||||||||||||||||||||
1204 | - | |||||||||||||||||||||||||||||||
1205 | rl_bind_keyseq_if_unbound ("\033[1;3C", rl_forward_word); | - | ||||||||||||||||||||||||||||||
1206 | rl_bind_keyseq_if_unbound ("\033[1;3D", rl_backward_word); | - | ||||||||||||||||||||||||||||||
1207 | _rl_keymap = xkeymap; | - | ||||||||||||||||||||||||||||||
1208 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1209 | - | |||||||||||||||||||||||||||||||
1210 | - | |||||||||||||||||||||||||||||||
1211 | - | |||||||||||||||||||||||||||||||
1212 | - | |||||||||||||||||||||||||||||||
1213 | static void | - | ||||||||||||||||||||||||||||||
1214 | bind_arrow_keys (void) | - | ||||||||||||||||||||||||||||||
1215 | { | - | ||||||||||||||||||||||||||||||
1216 | bind_arrow_keys_internal (emacs_standard_keymap); | - | ||||||||||||||||||||||||||||||
1217 | - | |||||||||||||||||||||||||||||||
1218 | - | |||||||||||||||||||||||||||||||
1219 | bind_arrow_keys_internal (vi_movement_keymap); | - | ||||||||||||||||||||||||||||||
1220 | - | |||||||||||||||||||||||||||||||
1221 | - | |||||||||||||||||||||||||||||||
1222 | if (vi_movement_keymap[(('[') & 0x1f)].type == 1
| 0 | ||||||||||||||||||||||||||||||
1223 | rl_bind_keyseq_in_map ("\033", (rl_command_func_t *) never executed: rl_bind_keyseq_in_map ("\033", (rl_command_func_t *) ((void *)0) , vi_movement_keymap); | 0 | ||||||||||||||||||||||||||||||
1224 | ((void *)0) never executed: rl_bind_keyseq_in_map ("\033", (rl_command_func_t *) ((void *)0) , vi_movement_keymap); | 0 | ||||||||||||||||||||||||||||||
1225 | , vi_movement_keymap); never executed: rl_bind_keyseq_in_map ("\033", (rl_command_func_t *) ((void *)0) , vi_movement_keymap); | 0 | ||||||||||||||||||||||||||||||
1226 | bind_arrow_keys_internal (vi_insertion_keymap); | - | ||||||||||||||||||||||||||||||
1227 | - | |||||||||||||||||||||||||||||||
1228 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1229 | - | |||||||||||||||||||||||||||||||
1230 | static void | - | ||||||||||||||||||||||||||||||
1231 | bind_bracketed_paste_prefix (void) | - | ||||||||||||||||||||||||||||||
1232 | { | - | ||||||||||||||||||||||||||||||
1233 | Keymap xkeymap; | - | ||||||||||||||||||||||||||||||
1234 | - | |||||||||||||||||||||||||||||||
1235 | xkeymap = _rl_keymap; | - | ||||||||||||||||||||||||||||||
1236 | - | |||||||||||||||||||||||||||||||
1237 | _rl_keymap = emacs_standard_keymap; | - | ||||||||||||||||||||||||||||||
1238 | rl_bind_keyseq_if_unbound ("\033[200~", rl_bracketed_paste_begin); | - | ||||||||||||||||||||||||||||||
1239 | - | |||||||||||||||||||||||||||||||
1240 | _rl_keymap = vi_insertion_keymap; | - | ||||||||||||||||||||||||||||||
1241 | rl_bind_keyseq_if_unbound ("\033[200~", rl_bracketed_paste_begin); | - | ||||||||||||||||||||||||||||||
1242 | - | |||||||||||||||||||||||||||||||
1243 | _rl_keymap = xkeymap; | - | ||||||||||||||||||||||||||||||
1244 | } never executed: end of block | 0 | ||||||||||||||||||||||||||||||
1245 | - | |||||||||||||||||||||||||||||||
1246 | - | |||||||||||||||||||||||||||||||
1247 | - | |||||||||||||||||||||||||||||||
1248 | - | |||||||||||||||||||||||||||||||
1249 | - | |||||||||||||||||||||||||||||||
1250 | - | |||||||||||||||||||||||||||||||
1251 | - | |||||||||||||||||||||||||||||||
1252 | int | - | ||||||||||||||||||||||||||||||
1253 | rl_save_state (struct readline_state *sp) | - | ||||||||||||||||||||||||||||||
1254 | { | - | ||||||||||||||||||||||||||||||
1255 | if (sp == 0
| 0 | ||||||||||||||||||||||||||||||
1256 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
1257 | - | |||||||||||||||||||||||||||||||
1258 | sp->point = rl_point; | - | ||||||||||||||||||||||||||||||
1259 | sp->end = rl_end; | - | ||||||||||||||||||||||||||||||
1260 | sp->mark = rl_mark; | - | ||||||||||||||||||||||||||||||
1261 | sp->buffer = rl_line_buffer; | - | ||||||||||||||||||||||||||||||
1262 | sp->buflen = rl_line_buffer_len; | - | ||||||||||||||||||||||||||||||
1263 | sp->ul = rl_undo_list; | - | ||||||||||||||||||||||||||||||
1264 | sp->prompt = rl_prompt; | - | ||||||||||||||||||||||||||||||
1265 | - | |||||||||||||||||||||||||||||||
1266 | sp->rlstate = rl_readline_state; | - | ||||||||||||||||||||||||||||||
1267 | sp->done = rl_done; | - | ||||||||||||||||||||||||||||||
1268 | sp->kmap = _rl_keymap; | - | ||||||||||||||||||||||||||||||
1269 | - | |||||||||||||||||||||||||||||||
1270 | sp->lastfunc = rl_last_func; | - | ||||||||||||||||||||||||||||||
1271 | sp->insmode = rl_insert_mode; | - | ||||||||||||||||||||||||||||||
1272 | sp->edmode = rl_editing_mode; | - | ||||||||||||||||||||||||||||||
1273 | sp->kseq = rl_executing_keyseq; | - | ||||||||||||||||||||||||||||||
1274 | sp->kseqlen = rl_key_sequence_length; | - | ||||||||||||||||||||||||||||||
1275 | sp->inf = rl_instream; | - | ||||||||||||||||||||||||||||||
1276 | sp->outf = rl_outstream; | - | ||||||||||||||||||||||||||||||
1277 | sp->pendingin = rl_pending_input; | - | ||||||||||||||||||||||||||||||
1278 | sp->macro = rl_executing_macro; | - | ||||||||||||||||||||||||||||||
1279 | - | |||||||||||||||||||||||||||||||
1280 | sp->catchsigs = rl_catch_signals; | - | ||||||||||||||||||||||||||||||
1281 | sp->catchsigwinch = rl_catch_sigwinch; | - | ||||||||||||||||||||||||||||||
1282 | - | |||||||||||||||||||||||||||||||
1283 | sp->entryfunc = rl_completion_entry_function; | - | ||||||||||||||||||||||||||||||
1284 | sp->menuentryfunc = rl_menu_completion_entry_function; | - | ||||||||||||||||||||||||||||||
1285 | sp->ignorefunc = rl_ignore_some_completions_function; | - | ||||||||||||||||||||||||||||||
1286 | sp->attemptfunc = rl_attempted_completion_function; | - | ||||||||||||||||||||||||||||||
1287 | sp->wordbreakchars = rl_completer_word_break_characters; | - | ||||||||||||||||||||||||||||||
1288 | - | |||||||||||||||||||||||||||||||
1289 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||
1290 | } | - | ||||||||||||||||||||||||||||||
1291 | - | |||||||||||||||||||||||||||||||
1292 | int | - | ||||||||||||||||||||||||||||||
1293 | rl_restore_state (struct readline_state *sp) | - | ||||||||||||||||||||||||||||||
1294 | { | - | ||||||||||||||||||||||||||||||
1295 | if (sp == 0
| 0 | ||||||||||||||||||||||||||||||
1296 | return never executed: -1;return -1; never executed: return -1; | 0 | ||||||||||||||||||||||||||||||
1297 | - | |||||||||||||||||||||||||||||||
1298 | rl_point = sp->point; | - | ||||||||||||||||||||||||||||||
1299 | rl_end = sp->end; | - | ||||||||||||||||||||||||||||||
1300 | rl_mark = sp->mark; | - | ||||||||||||||||||||||||||||||
1301 | the_line = rl_line_buffer = sp->buffer; | - | ||||||||||||||||||||||||||||||
1302 | rl_line_buffer_len = sp->buflen; | - | ||||||||||||||||||||||||||||||
1303 | rl_undo_list = sp->ul; | - | ||||||||||||||||||||||||||||||
1304 | rl_prompt = sp->prompt; | - | ||||||||||||||||||||||||||||||
1305 | - | |||||||||||||||||||||||||||||||
1306 | rl_readline_state = sp->rlstate; | - | ||||||||||||||||||||||||||||||
1307 | rl_done = sp->done; | - | ||||||||||||||||||||||||||||||
1308 | _rl_keymap = sp->kmap; | - | ||||||||||||||||||||||||||||||
1309 | - | |||||||||||||||||||||||||||||||
1310 | rl_last_func = sp->lastfunc; | - | ||||||||||||||||||||||||||||||
1311 | rl_insert_mode = sp->insmode; | - | ||||||||||||||||||||||||||||||
1312 | rl_editing_mode = sp->edmode; | - | ||||||||||||||||||||||||||||||
1313 | rl_executing_keyseq = sp->kseq; | - | ||||||||||||||||||||||||||||||
1314 | rl_key_sequence_length = sp->kseqlen; | - | ||||||||||||||||||||||||||||||
1315 | rl_instream = sp->inf; | - | ||||||||||||||||||||||||||||||
1316 | rl_outstream = sp->outf; | - | ||||||||||||||||||||||||||||||
1317 | rl_pending_input = sp->pendingin; | - | ||||||||||||||||||||||||||||||
1318 | rl_executing_macro = sp->macro; | - | ||||||||||||||||||||||||||||||
1319 | - | |||||||||||||||||||||||||||||||
1320 | rl_catch_signals = sp->catchsigs; | - | ||||||||||||||||||||||||||||||
1321 | rl_catch_sigwinch = sp->catchsigwinch; | - | ||||||||||||||||||||||||||||||
1322 | - | |||||||||||||||||||||||||||||||
1323 | rl_completion_entry_function = sp->entryfunc; | - | ||||||||||||||||||||||||||||||
1324 | rl_menu_completion_entry_function = sp->menuentryfunc; | - | ||||||||||||||||||||||||||||||
1325 | rl_ignore_some_completions_function = sp->ignorefunc; | - | ||||||||||||||||||||||||||||||
1326 | rl_attempted_completion_function = sp->attemptfunc; | - | ||||||||||||||||||||||||||||||
1327 | rl_completer_word_break_characters = sp->wordbreakchars; | - | ||||||||||||||||||||||||||||||
1328 | - | |||||||||||||||||||||||||||||||
1329 | return never executed: (0);return (0); never executed: return (0); | 0 | ||||||||||||||||||||||||||||||
1330 | } | - | ||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |