summaryrefslogtreecommitdiffstats
path: root/libsmartcols/src/cell.c
diff options
context:
space:
mode:
authorKarel Zak2014-05-05 16:32:14 +0200
committerKarel Zak2014-05-13 12:09:03 +0200
commit3eb482d027bf797ba0eba1a770498018c4ec1c1c (patch)
tree5a3f3205df44e547cc734639d78af732b19ddf1f /libsmartcols/src/cell.c
parentlib/colors: support schemes customization (diff)
downloadkernel-qcow2-util-linux-3eb482d027bf797ba0eba1a770498018c4ec1c1c.tar.gz
kernel-qcow2-util-linux-3eb482d027bf797ba0eba1a770498018c4ec1c1c.tar.xz
kernel-qcow2-util-linux-3eb482d027bf797ba0eba1a770498018c4ec1c1c.zip
libsmartcols: use new colors API
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libsmartcols/src/cell.c')
-rw-r--r--libsmartcols/src/cell.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsmartcols/src/cell.c b/libsmartcols/src/cell.c
index 491b8a15c..d73a1f808 100644
--- a/libsmartcols/src/cell.c
+++ b/libsmartcols/src/cell.c
@@ -117,7 +117,7 @@ const char *scols_cell_get_data(const struct libscols_cell *ce)
/**
* scols_cell_set_color:
* @ce: a pointer to a struct libscols_cell instance
- * @color: a color string
+ * @color: color name or ESC sequence
*
* Set the color of @ce to @color.
*
@@ -132,8 +132,8 @@ int scols_cell_set_color(struct libscols_cell *ce, const char *color)
if (!ce)
return -EINVAL;
if (color) {
- if (isalnum(*color)) {
- color = colorscheme_from_string(color);
+ if (isalpha(*color)) {
+ color = color_sequence_from_colorname(color);
if (!color)
return -EINVAL;