]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib/colors: move colors canonicalization to lib/color-names.c
authorKarel Zak <kzak@redhat.com>
Mon, 27 Feb 2023 16:43:11 +0000 (17:43 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 27 Feb 2023 16:43:11 +0000 (17:43 +0100)
commit208480c4bafb7e01b6ff89fa1dd7316ee73cdc53
tree2d3225ca1a839f90e098f44821b7de65cfa73aca
parent35e84552ce30a75991c2063244769bbd79cb0ea8
lib/colors: move colors canonicalization to lib/color-names.c

* let's make simplified sequences (e.g. "35;4")  used without
  lib/colors.c (without color schemes)

* add function to detect already usable esc sequence

* support this new feature in "test_colors --color <name|seq|...>"

  ./test_colors --color "red"
  ./test_colors --color "35;5"

Signed-off-by: Karel Zak <kzak@redhat.com>
include/color-names.h
lib/color-names.c
lib/colors.c