summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libsmartcols/src/cell.c6
-rw-r--r--libsmartcols/src/column.c6
-rw-r--r--libsmartcols/src/line.c4
3 files changed, 8 insertions, 8 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;
diff --git a/libsmartcols/src/column.c b/libsmartcols/src/column.c
index 4ee782fb2..a8f117f85 100644
--- a/libsmartcols/src/column.c
+++ b/libsmartcols/src/column.c
@@ -190,7 +190,7 @@ struct libscols_cell *scols_column_get_header(struct libscols_column *cl)
/**
* scols_column_set_color:
* @cl: a pointer to a struct libscols_column instance
- * @color: a color string
+ * @color: color name or ESC sequence
*
* The default color for data cells and column header.
*
@@ -210,8 +210,8 @@ int scols_column_set_color(struct libscols_column *cl, const char *color)
if (!cl)
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;
diff --git a/libsmartcols/src/line.c b/libsmartcols/src/line.c
index 686a11945..32c8964ad 100644
--- a/libsmartcols/src/line.c
+++ b/libsmartcols/src/line.c
@@ -285,7 +285,7 @@ int scols_line_next_child(struct libscols_line *ln,
/**
* scols_line_set_color:
* @ln: a pointer to a struct libscols_line instance
- * @color: a color string
+ * @color: color name or ESC sequence
*
* Returns: 0, a negative value in case of an error.
*/
@@ -298,7 +298,7 @@ int scols_line_set_color(struct libscols_line *ln, const char *color)
return -EINVAL;
if (color) {
if (isalnum(*color)) {
- color = colorscheme_from_string(color);
+ color = color_sequence_from_colorname(color);
if (!color)
return -EINVAL;