diff options
author | June McEnroe <june@causal.agency> | 2020-12-29 17:44:48 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-29 17:44:48 -0500 |
commit | 9e72c0acce13944e568b1a164058b779a4d537f6 (patch) | |
tree | 23f67535c762b45709d61d122bcd6eef03a4335a /bin/hilex/hilex.c | |
parent | Match lex/yacc %% %{ %} lines as Macro (diff) | |
download | src-9e72c0acce13944e568b1a164058b779a4d537f6.tar.gz src-9e72c0acce13944e568b1a164058b779a4d537f6.zip |
Clean up hilex code somewhat
Diffstat (limited to 'bin/hilex/hilex.c')
-rw-r--r-- | bin/hilex/hilex.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/hilex/hilex.c b/bin/hilex/hilex.c index d99b14bb..b2bebd5f 100644 --- a/bin/hilex/hilex.c +++ b/bin/hilex/hilex.c @@ -82,9 +82,13 @@ static const char *ClassName[] = { static void debugFormat(const char *opts[], enum Class class, const char *text) { - printf("%s(\33[3m", ClassName[class]); - FormatANSI.format(opts, class, text); - printf("\33[m)"); + if (class != Normal) { + printf("%s(", ClassName[class]); + FormatANSI.format(opts, class, text); + printf(")"); + } else { + printf("%s", text); + } } const struct Formatter FormatDebug = { .format = debugFormat }; |