mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-06 08:46:41 +08:00
Use rl_clear_history only if available, fallback to clear_history if not.
For ancient readline (I'm stuck to it on my embedded target...), rl_clear_history is not available, so using clear_history instead.
This commit is contained in:
parent
6f097d37e6
commit
5f0dd75c1f
@ -917,6 +917,10 @@ void readline_exit(void)
|
||||
{
|
||||
if (!quit)
|
||||
rl_callback_handler_remove();
|
||||
#if (RL_VERSION_MAJOR<=5 || (RL_VERSION_MAJOR==6 && RL_VERSION_MINOR<=3))
|
||||
clear_history();
|
||||
#else
|
||||
rl_clear_history();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user