aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2020-05-02 08:11:46 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2020-05-23 14:25:34 +0200
commite18f7dbc1f52ad5443e29b4ace1375613394d7b7 (patch)
tree612c60402b72d2d7dffb43f81f8a2b9a90768329
parent63a2bc8a6b81392797b2cccaa4108e0cfc1d269d (diff)
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.
-rw-r--r--src/libdebug/debug.c2
1 files changed, 1 insertions, 1 deletions
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)