From e18f7dbc1f52ad5443e29b4ace1375613394d7b7 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 2 May 2020 08:11:46 +0200 Subject: [PATCH] Make debug output aliged Debug output position dependes on the length of the line number. Now the line number is filled with spaces, so it always has four digits. Now the following messages in each line are alinged. --- src/libdebug/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libdebug/debug.c b/src/libdebug/debug.c index e1baa8d..5d2db98 100644 --- a/src/libdebug/debug.c +++ b/src/libdebug/debug.c @@ -136,7 +136,7 @@ void _printdebug(const char *file, const char __attribute__((unused)) *function, get_win_size(&w, &h); printf("\0337\033[%d;%dr\0338", debug_limit_scroll + 1, h); } - printf("%s%s:%d %s: %s\033[0;39m", debug_cat[cat].color, file, line, debug_level[level], buffer); + printf("%s%s:%4d %s: %s\033[0;39m", debug_cat[cat].color, file, line, debug_level[level], buffer); if (debug_limit_scroll) printf("\0337\033[%d;%dr\0338", 1, h); if (print_console_text)