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 | 693d2d48b0c5dc584d01c6878bfc293823613f2a (patch) | |
tree | af169bacd1bed94b8a5809370d6ab27e9d31e1d8 /bin/hilex/hilex.c | |
parent | Match lex/yacc %% %{ %} lines as Macro (diff) | |
download | src-693d2d48b0c5dc584d01c6878bfc293823613f2a.tar.gz src-693d2d48b0c5dc584d01c6878bfc293823613f2a.zip |
Clean up hilex code somewhat
Diffstat (limited to '')
-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 43130f4d..8b824bcd 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 }; |