From a10c0434932d41e6e83119ca807a6c2d07b7a044 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 6 May 2013 19:07:23 +0200 Subject: lib/colors: add support for auto, always and never modes ... to implement --color[=] Signed-off-by: Karel Zak --- include/colors.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/colors.h') diff --git a/include/colors.h b/include/colors.h index dd77bf6df..f9e36fd57 100644 --- a/include/colors.h +++ b/include/colors.h @@ -38,8 +38,19 @@ #define UL_COLOR_WHITE "\033[1;37m" +/* --color[=WHEN] */ +enum colortmode { + UL_COLORMODE_AUTO = 0, + UL_COLORMODE_NEVER, + UL_COLORMODE_ALWAYS, + + __UL_NCOLORMODES /* last */ +}; + +extern int colormode_from_string(const char *str); + /* Initialize the global variable OUT_IS_TERM */ -extern int colors_init(void); +extern int colors_init(int mode); /* Set the color to CLR_SCHEME */ extern void color_enable(const char *clr_scheme); -- cgit v1.2.3-55-g7522