bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue using more than 255 color pairs


From: David Unterwandling
Subject: Re: Issue using more than 255 color pairs
Date: Sat, 29 Jul 2023 01:29:40 +0200

To make the previous code complete:

#define NO_COLOR 0
#define CLR_BLUE 4
#define CLR_DARKGRAY 8
#define CLR_BRIGHT_BLUE 12
#define CLR_BLACK 16
#define BRIGHT 8

int vblack;

static unsigned char
black_switch(unsigned char c)
{
    switch (c) {
        case CLR_DARKGRAY:
            switch (vblack) {
                case 0:
                case 2: return NO_COLOR;
            } break;
        case CLR_BLACK:
            switch (vblack) {
                case 0: return CLR_DARKGRAY;
                case 2: return CLR_BLUE;
            } break;
        case CLR_BLUE:
            switch (vblack)
                case 2: return CLR_BRIGHT_BLUE;
    }
    return c;
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]