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.
This commit is contained in:
Andreas Eversberg 2020-05-02 08:11:46 +02:00
parent 63a2bc8a6b
commit e18f7dbc1f
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ void _printdebug(const char *file, const char __attribute__((unused)) *function,
get_win_size(&w, &h); get_win_size(&w, &h);
printf("\0337\033[%d;%dr\0338", debug_limit_scroll + 1, 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) if (debug_limit_scroll)
printf("\0337\033[%d;%dr\0338", 1, h); printf("\0337\033[%d;%dr\0338", 1, h);
if (print_console_text) if (print_console_text)