|
From: | Bill Gray |
Subject: | Re: Help wanted with bkgd() rookie mistake |
Date: | Sun, 5 Jan 2025 13:06:31 -0500 |
User-agent: | Mozilla Thunderbird |
Hi Branden, On 1/5/25 11:23, G. Branden Robinson wrote:
Hi folks, I come once again to confess my confusion with basic curses operations. Please find attached two C programs; I call them "bkgd" and "bkgrnd", because they correspond to curses functions of the same name. bkgrnd, the wide-character program, works fine. bkgd, which you'd think would be simpler, doesn't. In both, I expect the background character to be set to an underlined @ sign.
I see the background as underlined @ signs with both programs. I'm using (default, system-installed, now getting to be elderly) ncurses 6.2.20200212. So perhaps a behavior change between then and now?
However, both PDCurses and PDCursesMod show @ with no underscore. I agree that this seems wrong.
(BTW, why do you have tests for NCURSES_VERSION and NCURSES_OPAQUE? It looks to me as if you aren't using anything ncurses-specific and that your code doesn't rely on opaqueness. FWIW, PDCursesMod has opaque window and screen structures; PDCurses doesn't.)
-- Bill
But only bkgrnd() is behaving this way. It seems that logically or-ing the character literal '@' with A_UNDERLINE is somehow wiping out the character part. Except it's not, because if I printf that expression as a decimal integer, I can see that they indeed compose. bkgd() seems to be discarding my character code. What am I not understanding? Regards, Branden
[Prev in Thread] | Current Thread | [Next in Thread] |