summaryrefslogtreecommitdiffstats
path: root/include/colors.h
diff options
context:
space:
mode:
authorKarel Zak2015-07-24 12:57:46 +0200
committerKarel Zak2015-07-24 12:57:46 +0200
commit0bef6f759beb87d743c6dfb2a95d3e0b7075a462 (patch)
treee373aca99dedd1a648cbb08238085f69efde308f /include/colors.h
parenttests: add udevadm settle (diff)
downloadkernel-qcow2-util-linux-0bef6f759beb87d743c6dfb2a95d3e0b7075a462.tar.gz
kernel-qcow2-util-linux-0bef6f759beb87d743c6dfb2a95d3e0b7075a462.tar.xz
kernel-qcow2-util-linux-0bef6f759beb87d743c6dfb2a95d3e0b7075a462.zip
libsmartcols: don't link with tinfo
Let's move color names to sequence translation to separate file to make it usable without all the stuff in lib/colors.c. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/colors.h')
-rw-r--r--include/colors.h33
1 files changed, 1 insertions, 32 deletions
diff --git a/include/colors.h b/include/colors.h
index df6feb739..fda1ca98d 100644
--- a/include/colors.h
+++ b/include/colors.h
@@ -11,34 +11,7 @@
#include <stdio.h>
#include <unistd.h>
-#define UL_COLOR_RESET "\033[0m"
-#define UL_COLOR_BOLD "\033[1m"
-#define UL_COLOR_HALFBRIGHT "\033[2m"
-#define UL_COLOR_UNDERSCORE "\033[4m"
-#define UL_COLOR_BLINK "\033[5m"
-#define UL_COLOR_REVERSE "\033[7m"
-
-/* Standard colors */
-#define UL_COLOR_BLACK "\033[30m"
-#define UL_COLOR_RED "\033[31m"
-#define UL_COLOR_GREEN "\033[32m"
-#define UL_COLOR_BROWN "\033[33m" /* well, brown */
-#define UL_COLOR_BLUE "\033[34m"
-#define UL_COLOR_MAGENTA "\033[35m"
-#define UL_COLOR_CYAN "\033[36m"
-#define UL_COLOR_GRAY "\033[37m"
-
-/* Bold variants */
-#define UL_COLOR_DARK_GRAY "\033[1;30m"
-#define UL_COLOR_BOLD_RED "\033[1;31m"
-#define UL_COLOR_BOLD_GREEN "\033[1;32m"
-#define UL_COLOR_BOLD_YELLOW "\033[1;33m"
-#define UL_COLOR_BOLD_BLUE "\033[1;34m"
-#define UL_COLOR_BOLD_MAGENTA "\033[1;35m"
-#define UL_COLOR_BOLD_CYAN "\033[1;36m"
-
-#define UL_COLOR_WHITE "\033[1;37m"
-
+#include "color-names.h"
/* --color[=WHEN] */
enum colortmode {
@@ -94,8 +67,4 @@ static inline void color_disable(void)
color_fdisable(stdout);
}
-/* converts "red" to UL_COLOR_RED, etc. */
-extern const char *color_sequence_from_colorname(const char *str);
-
-
#endif /* UTIL_LINUX_COLORS_H */