summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2013-09-02 10:54:30 +0200
committerKarel Zak <kzak@redhat.com>2013-09-16 16:47:09 +0200
commit80a1712f546eb0669c9e4130a32c78cdeeb5fdab (patch)
treef62db3867f5e3aa18b2c36e2f7880e50569c513b /lib
parenta41309c2277aa5cc623288b3ea54516a80f7f6d2 (diff)
downloadutil-linux-80a1712f546eb0669c9e4130a32c78cdeeb5fdab.tar.gz
fdisk: add -L to colorize output
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/colors.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/colors.c b/lib/colors.c
index c8075cc1..51faa010 100644
--- a/lib/colors.c
+++ b/lib/colors.c
@@ -27,16 +27,21 @@ int colors_init(int mode)
return ul_color_term_ok;
}
-void color_enable(const char *color_scheme)
+int colors_wanted(void)
+{
+ return ul_color_term_ok;
+}
+
+void color_fenable(const char *color_scheme, FILE *f)
{
if (ul_color_term_ok && color_scheme)
- fputs(color_scheme, stdout);
+ fputs(color_scheme, f);
}
-void color_disable(void)
+void color_fdisable(FILE *f)
{
if (ul_color_term_ok)
- fputs(UL_COLOR_RESET, stdout);
+ fputs(UL_COLOR_RESET, f);
}
int colormode_from_string(const char *str)