PDCurses Win32a

Hi all,
i have a problem with the win32a implementation of pdcurses. I've compiled win32a with codeblocks 3.12 mingw setup on windows 8.

When i try to change colors of the terminal with this code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <iostream>
#include <curses.h>

using namespace std;

int main(){
    initscr();

    start_color();
    use_default_colors();

    if(can_change_color() == true){
        printw("COLORS: %d, COLOR_PAIRS: %d\n\n", COLORS, COLOR_PAIRS);
    }

    init_color(2, 1000, 0,      0);
    init_color(3, 0,    1000,   0);
    init_color(4, 0,    0,      1000);

    init_pair(1, 2, 0);
    init_pair(2, 3, 0);
    init_pair(3, 4, 0);

    attron( COLOR_PAIR(1) );
    printw("COLORS: %d, COLOR_PAIRS: %d\n\n", COLORS, COLOR_PAIRS);
    attroff( COLOR_PAIR(1) );

    attron( COLOR_PAIR(2) );
    printw("COLORS: %d, COLOR_PAIRS: %d\n\n", COLORS, COLOR_PAIRS);
    attroff( COLOR_PAIR(2) );

    attron( COLOR_PAIR(3) );
    printw("COLORS: %d, COLOR_PAIRS: %d\n\n", COLORS, COLOR_PAIRS);
    attroff( COLOR_PAIR(3) );

    getch();

    refresh();

    endwin();
}


The result is:


COLORS: 256, COLOR_PAIRS: 256 <- gray text

COLORS: 256, COLOR_PAIRS: 256 <- green text

COLORS: 256, COLOR_PAIRS: 256 <- gray underlined text

COLORS: 256, COLOR_PAIRS: 256 <- gray underlined italic text


I'm going MAD!
Topic archived. No new replies allowed.