chiark / gitweb /
util: rework ANSI escape code macros
[elogind.git] / src / util.c
index 3179502f6c01466b3614fba82d1699ffc1337986..a6cdfd5b5ade9bf23a6a5082cf15392ded1d0150 100644 (file)
@@ -2467,14 +2467,14 @@ int ask(char *ret, const char *replies, const char *text, ...) {
                 bool need_nl = true;
 
                 if (on_tty)
-                        fputs("\x1B[1m", stdout);
+                        fputs(ANSI_HIGHLIGHT_ON, stdout);
 
                 va_start(ap, text);
                 vprintf(text, ap);
                 va_end(ap);
 
                 if (on_tty)
-                        fputs("\x1B[0m", stdout);
+                        fputs(ANSI_HIGHLIGHT_OFF, stdout);
 
                 fflush(stdout);