Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rl_set_getc_func() #29

Merged
merged 1 commit into from
May 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions include/editline.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ extern void add_history (const char *line);
extern int read_history (const char *filename);
extern int write_history (const char *filename);

extern rl_getc_func_t *rl_set_getc_func(rl_getc_func_t *func);

extern rl_completion_func_t *rl_attempted_completion_function;
extern rl_complete_func_t *rl_set_complete_func (rl_complete_func_t *func);
extern rl_list_possib_func_t *rl_set_list_possib_func (rl_list_possib_func_t *func);
Expand Down
7 changes: 7 additions & 0 deletions src/editline.c
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,13 @@ el_status_t el_bind_key_in_metamap(int key, el_keymap_func_t function)
return el_bind_key_in_map(key, function, MetaMap, NELEMS(MetaMap));
}

rl_getc_func_t *rl_set_getc_func(rl_getc_func_t *func)
{
rl_getc_func_t *old = rl_getc_function;
rl_getc_function = func;
return old;
}

/**
* Local Variables:
* c-file-style: "k&r"
Expand Down