Bash
5.0-beta2
Bash - Bourne Again shell
|
#include <sys/types.h>
#include "ansi_stdlib.h"
#include <stdio.h>
#include "rldefs.h"
#include "readline.h"
#include "history.h"
#include "rlprivate.h"
#include "xmalloc.h"
Go to the source code of this file.
Macros | |
#define | READLINE_LIBRARY |
#define | TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i))) |
Functions | |
void | _hs_replace_history_data () |
static UNDO_LIST * | alloc_undo_entry (enum undo_code what, int start, int end, char *text) |
void | rl_add_undo (enum undo_code what, int start, int end, char *text) |
void | _rl_free_undo_list (UNDO_LIST *ul) |
void | rl_free_undo_list (void) |
UNDO_LIST * | _rl_copy_undo_entry (UNDO_LIST *entry) |
UNDO_LIST * | _rl_copy_undo_list (UNDO_LIST *head) |
int | rl_do_undo (void) |
int | _rl_fix_last_undo_of_type (int type, int start, int end) |
int | rl_begin_undo_group (void) |
int | rl_end_undo_group (void) |
int | rl_modifying (int start, int end) |
int | rl_revert_line (int count, int key) |
int | rl_undo_command (int count, int key) |
Variables | |
HIST_ENTRY * | _rl_saved_line_for_history |
int | _rl_doing_an_undo = 0 |
int | _rl_undo_group_level = 0 |
UNDO_LIST * | rl_undo_list = (UNDO_LIST *)NULL |
void _hs_replace_history_data | ( | ) |
Definition at line 73 of file undo.c.
References undo_list::end, undo_list::next, NULL, undo_list::start, temp, undo_list::text, undo_list::what, and xmalloc().
Referenced by _rl_copy_undo_entry(), and rl_add_undo().
void rl_add_undo | ( | enum undo_code | what, |
int | start, | ||
int | end, | ||
char * | text | ||
) |
Definition at line 90 of file undo.c.
References alloc_undo_entry(), undo_list::next, rl_undo_list, and temp.
Referenced by rl_begin_undo_group(), rl_delete_text(), rl_end_undo_group(), rl_insert_text(), and rl_modifying().
void _rl_free_undo_list | ( | UNDO_LIST * | ul | ) |
Definition at line 101 of file undo.c.
References undo_list::next, undo_list::text, UNDO_DELETE, undo_list::what, and xfree().
Referenced by rl_free_undo_list().
void rl_free_undo_list | ( | void | ) |
Definition at line 119 of file undo.c.
References _hs_replace_history_data(), _rl_free_undo_list(), NULL, and rl_undo_list.
Referenced by _rl_nsearch_dosearch(), free_undo_list(), make_history_line_current(), readline_internal_teardown(), rl_free_line_state(), rl_replace_line(), and rl_vi_movement_mode().
Definition at line 130 of file undo.c.
References alloc_undo_entry(), undo_list::end, NULL, savestring(), undo_list::start, undo_list::text, and undo_list::what.
Referenced by _rl_copy_undo_list().
Definition at line 140 of file undo.c.
References _rl_copy_undo_entry(), c, list, and undo_list::next.
int rl_do_undo | ( | void | ) |
Definition at line 169 of file undo.c.
References _hs_replace_history_data(), current_history(), _hist_entry::data, undo_list::end, FREE, if(), _hist_entry::line, undo_list::next, replace_history_entry(), rl_delete_text(), rl_ding(), rl_insert_text(), rl_line_buffer, rl_point, RL_SETSTATE, RL_STATE_UNDOING, rl_undo_list, RL_UNSETSTATE, undo_list::start, temp, undo_list::text, _hist_entry::timestamp, TRANS, UNDO_BEGIN, UNDO_DELETE, UNDO_END, UNDO_INSERT, undo_list::what, where_history(), and xfree().
Referenced by _rl_revert_all_lines(), rl_revert_line(), rl_undo_command(), rl_vi_overstrike_delete(), rl_yank_last_arg(), and vi_yank_dispatch().
int _rl_fix_last_undo_of_type | ( | int | type, |
int | start, | ||
int | end | ||
) |
Definition at line 274 of file undo.c.
References undo_list::end, undo_list::next, undo_list::start, and undo_list::what.
int rl_begin_undo_group | ( | void | ) |
Definition at line 292 of file undo.c.
References rl_add_undo(), and UNDO_BEGIN.
Referenced by _rl_overwrite_char(), _rl_overwrite_rubout(), _rl_replace_text(), _rl_vi_change_char(), _rl_vi_replace_insert(), _rl_vi_stuff_insert(), insert_all_matches(), rl_kill_full_line(), rl_modifying(), rl_transpose_chars(), rl_transpose_words(), rl_vi_arg_digit(), rl_vi_change_case(), rl_vi_overstrike(), rl_vi_start_inserting(), rl_yank_nth_arg_internal(), vi_change_dispatch(), and vi_yank_dispatch().
int rl_end_undo_group | ( | void | ) |
Definition at line 301 of file undo.c.
References rl_add_undo(), and UNDO_END.
Referenced by _rl_overwrite_char(), _rl_overwrite_rubout(), _rl_replace_text(), _rl_vi_change_char(), _rl_vi_done_inserting(), _rl_vi_replace_insert(), _rl_vi_stuff_insert(), insert_all_matches(), rl_kill_full_line(), rl_modifying(), rl_transpose_chars(), rl_transpose_words(), rl_vi_arg_digit(), rl_vi_change_case(), rl_vi_overstrike_delete(), rl_yank_nth_arg_internal(), vi_change_dispatch(), and vi_yank_dispatch().
int rl_modifying | ( | int | start, |
int | end | ||
) |
Definition at line 310 of file undo.c.
References NULL, rl_add_undo(), rl_begin_undo_group(), rl_copy_text(), rl_end_undo_group(), SWAP, temp, UNDO_DELETE, and UNDO_INSERT.
Referenced by invert_case_line(), and rl_change_case().
int rl_revert_line | ( | int | count, |
int | key | ||
) |
Definition at line 330 of file undo.c.
References rl_ding(), rl_do_undo(), rl_editing_mode, rl_mark, rl_point, and vi_mode.
Referenced by readline_internal_teardown().
int rl_undo_command | ( | int | count, |
int | key | ||
) |
Definition at line 349 of file undo.c.
References rl_ding(), and rl_do_undo().
Referenced by rl_vi_undo().
HIST_ENTRY* _rl_saved_line_for_history |
int _rl_doing_an_undo = 0 |
Definition at line 58 of file undo.c.
Referenced by rl_delete_text(), and rl_insert_text().
int _rl_undo_group_level = 0 |
Definition at line 61 of file undo.c.
Referenced by _rl_vi_done_inserting().
Definition at line 64 of file undo.c.
Referenced by _rl_nsearch_init(), _rl_revert_all_lines(), _rl_vi_done_inserting(), _rl_vi_save_replace(), readline_internal_teardown(), rl_add_undo(), rl_clear_history(), rl_do_undo(), rl_free_undo_list(), rl_insert_text(), rl_maybe_replace_line(), rl_maybe_save_line(), rl_maybe_unsave_line(), rl_redisplay(), rl_replace_from_history(), rl_restore_state(), and rl_save_state().