X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Freadline.h;h=5f420f96a14e9e92eba25f3e9f9718dd61941209;hb=e022e861939d2625fe2a6833977a8b924c3cbf31;hp=9219bfd7945e6931d8ea498edaaf19534a41953f;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/mware/readline.h b/bertos/mware/readline.h index 9219bfd7..5f420f96 100644 --- a/bertos/mware/readline.h +++ b/bertos/mware/readline.h @@ -43,6 +43,9 @@ * \version $Id$ * * \author Giovanni Bajo + * + * $WIZ$ module_name = "readline" + * $WIZ$ module_depends = "sprintf" */ @@ -53,7 +56,7 @@ #include -#define HISTORY_SIZE 1024 +#define HISTORY_SIZE 32 typedef int (*getc_hook)(void* user_data); typedef void (*putc_hook)(char ch, void* user_data); @@ -92,6 +95,7 @@ INLINE void rl_clear_history(struct RLContext *ctx) { memset(ctx->real_history, 0, sizeof(ctx->real_history)); ctx->history_pos = 0; + ctx->line_pos = ctx->history_pos; ctx->history = ctx->real_history; }