[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help wanted with bkgd() rookie mistake
From: |
G. Branden Robinson |
Subject: |
Re: Help wanted with bkgd() rookie mistake |
Date: |
Sun, 5 Jan 2025 12:17:15 -0600 |
Hi Bill,
At 2025-01-05T13:06:31-0500, Bill Gray wrote:
> 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?
Hmm. That may be. I'm on the bleeding edge with 6.5.20250104.
I'll have to uninstall my ncurses and use my similarly geriatric system
version...
...nope, it still reproduces even after uninstalling, deleting "bkgd",
and re-make(1)ing.
$ ldd ./bkgd
linux-vdso.so.1 (0x00007ffd6f0f9000)
libncurses.so.6 => /lib/x86_64-linux-gnu/libncurses.so.6
(0x00007f4be605d000)
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6
(0x00007f4be602e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4be5e5a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f4be5e54000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4be60b1000)
$ dpkg -S /lib/x86_64-linux-gnu/libncurses.so.6
libncurses6:amd64: /lib/x86_64-linux-gnu/libncurses.so.6
$ dpkg -s libncurses6:amd64 | grep -i version
Version: 6.2+20201114-2+deb11u2
The wide-character exhibit, "bkgrnd", continues to work fine, displaying
both the "@" and an underline in every character cell.
> 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.)
Sorry for the red herrings. You're right; those preprocessor tests are
irrelevant to this program. It's boilerplate that I've copied among a
bunch of little C programs I write to teach myself the library (and help
myself to tell the truth in the man pages).
Regards,
Branden
signature.asc
Description: PGP signature
- Help wanted with bkgd() rookie mistake, G. Branden Robinson, 2025/01/05
- Re: Help wanted with bkgd() rookie mistake, Bill Gray, 2025/01/05
- Re: Help wanted with bkgd() rookie mistake,
G. Branden Robinson <=
- Re: Help wanted with bkgd() rookie mistake, Thomas Dickey, 2025/01/05
- Re: Help wanted with bkgd() rookie mistake, G. Branden Robinson, 2025/01/05
- Re: Help wanted with bkgd() rookie mistake, Thomas Dickey, 2025/01/05
- Re: Help wanted with bkgd() rookie mistake, G. Branden Robinson, 2025/01/05
- SOLVED: Help wanted with bkgd() rookie mistake, G. Branden Robinson, 2025/01/05
- Re: Help wanted with bkgd() rookie mistake, Thomas Dickey, 2025/01/05