From f961456b29a6ca2bd386a672d2ea2782c925c72f Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 20 Oct 2015 13:27:14 +0100 Subject: lib/mp-readline: Add n_chars argument to mp_hal_erase_line_from_cursor. If VT100 support is not available then a given implementation of mp_hal_erase_line_from_cursor might need to know the number of characters to erase. This patch does not change generated code when VT100 is supported, since compiler can optimise away the argument. --- windows/windows_mphal.c | 2 +- windows/windows_mphal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'windows') diff --git a/windows/windows_mphal.c b/windows/windows_mphal.c index f2f8cd952..db03571ba 100644 --- a/windows/windows_mphal.c +++ b/windows/windows_mphal.c @@ -92,7 +92,7 @@ void mp_hal_move_cursor_back(uint pos) { SetConsoleCursorPosition(con_out, info.dwCursorPosition); } -void mp_hal_erase_line_from_cursor() { +void mp_hal_erase_line_from_cursor(uint n_chars_to_erase) { assure_conout_handle(); CONSOLE_SCREEN_BUFFER_INFO info; GetConsoleScreenBufferInfo(con_out, &info); diff --git a/windows/windows_mphal.h b/windows/windows_mphal.h index b9ed67e71..8173d93ec 100644 --- a/windows/windows_mphal.h +++ b/windows/windows_mphal.h @@ -29,4 +29,4 @@ #define MICROPY_HAL_HAS_VT100 (0) void mp_hal_move_cursor_back(unsigned int pos); -void mp_hal_erase_line_from_cursor(); +void mp_hal_erase_line_from_cursor(unsigned int n_chars_to_erase); -- cgit v1.2.3