diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-03 05:52:52 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-03 05:52:52 +0000 |
| commit | 2f679694a5b6bcd79ccc913b0e51677226432dc7 (patch) | |
| tree | 879a5bbe7d076f55fe8dde7c8772ff74f38de4f4 /log.c | |
| parent | config: clean up (diff) | |
| parent | Replace non-portable "\e" escape in string literals with "\033" (diff) | |
Merge branch 'e-escape' into master
Diffstat (limited to 'log.c')
| -rw-r--r-- | log.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -60,14 +60,14 @@ _log(enum log_class log_class, const char *module, const char *file, int lineno, } char clr[16]; - snprintf(clr, sizeof(clr), "\e[%dm", class_clr); - fprintf(stderr, "%s%s%s: ", colorize ? clr : "", class, colorize ? "\e[0m" : ""); + snprintf(clr, sizeof(clr), "\033[%dm", class_clr); + fprintf(stderr, "%s%s%s: ", colorize ? clr : "", class, colorize ? "\033[0m" : ""); if (colorize) - fprintf(stderr, "\e[2m"); + fprintf(stderr, "\033[2m"); fprintf(stderr, "%s:%d: ", file, lineno); if (colorize) - fprintf(stderr, "\e[0m"); + fprintf(stderr, "\033[0m"); vfprintf(stderr, fmt, va); |
