static char term_prompt[256];
static void *term_readline_opaque;
-static void term_show_prompt2(void)
+void readline_show_prompt(void)
{
term_printf("%s", term_prompt);
term_flush();
term_esc_state = IS_NORM;
}
-static void term_show_prompt(void)
-{
- term_show_prompt2();
- term_cmd_buf_index = 0;
- term_cmd_buf_size = 0;
-}
-
/* update the displayed command line */
static void term_update(void)
{
j = 0;
}
}
- term_show_prompt2();
+ readline_show_prompt();
}
}
term_readline_func = readline_func;
term_readline_opaque = opaque;
term_is_password = is_password;
- term_show_prompt();
+ term_cmd_buf_index = 0;
+ term_cmd_buf_size = 0;
}
const char *readline_get_history(unsigned int index)