From 984a2be450abac81474889b8bea4b3fbeddb26c5 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 27 Feb 2013 22:52:43 +0100 Subject: util, core: add support for ephemeral status lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ephemeral status lines do not end with a newline and they expect to be overwritten by the next printed status line. --- src/shared/util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/shared/util.h') diff --git a/src/shared/util.h b/src/shared/util.h index 19cc36af84..f8957bca42 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -59,6 +59,7 @@ union dirent_storage { #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m" #define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m" #define ANSI_HIGHLIGHT_OFF "\x1B[0m" +#define ANSI_ERASE_TO_END_OF_LINE "\x1B[K" size_t page_size(void); #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) @@ -354,8 +355,8 @@ int pipe_eof(int fd); cpu_set_t* cpu_set_malloc(unsigned *ncpus); -int status_vprintf(const char *status, bool ellipse, const char *format, va_list ap); -int status_printf(const char *status, bool ellipse, const char *format, ...); +int status_vprintf(const char *status, bool ellipse, bool ephemeral, const char *format, va_list ap); +int status_printf(const char *status, bool ellipse, bool ephemeral, const char *format, ...); int status_welcome(void); int fd_columns(int fd); -- cgit v1.2.3-54-g00ecf