Make default colormaps work.

Overwrite default colormaps only if asked.
Correctly interpret integers in mode().
Test registered colormaps after specials.
Silently ignore duplicated external palettes.
Add a set_special_colormaps function.
Do not sue ANSI_min/max as limits for the whole ANSI range.
Move global variables at the top of the file.
This commit is contained in:
Johann Dreo 2014-04-25 10:56:17 +02:00
commit d3efe7e851
2 changed files with 104 additions and 77 deletions

View file

@ -138,6 +138,8 @@ Gentoo
WARNING: be sure to specify a default colormap that is compatible with the special colormap's mode.
For instance, if you indicate `scale`, you can use `-d red,green,blue`, but `-d 12,13,14` will fail.
Also, if you specify `Scale`, you cannot use `-d red,green,blue`, but `-d Rainbow` will work.
Similarly, external palettes are converted from RGB to 256-ANSI and will thus not work if you use
them as default colormaps for a 8-colors mode special color.
* `-r TYPE(S)`, `--resources TYPE(S)`:
Print the names of available resources. Use a comma-separated list of resources names