[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
attr_get
From: |
Mike Gran |
Subject: |
attr_get |
Date: |
Fri, 5 Dec 2008 23:48:58 -0800 (PST) |
When calling attr_get(&attrs,&pair,NULL), the color pair value shows up both in
the returned pair and in the returned attrs value. Is this expected?
Running this code snippet....
int main()
{
attr_t attrs;
short pair;
initscr ();
attr_set (WA_UNDERLINE, 1, NULL);
attr_get (&attrs, &pair, NULL);
endwin();
printf ("INPUT: %x %d\n", WA_UNDERLINE, 1);
printf ("OUTPUT: %x %d\n", attrs, pair);
return 0;
}
... returns
INPUT: 20000 1
OUTPUT: 20100 1
The "100" in the "20100" value is COLOR_PAIR(1).
Thanks,
Mike Gran