|
From: | G. Branden Robinson |
Subject: | Re: Help wanted with bkgd() rookie mistake |
Date: | Sun, 5 Jan 2025 12:49:13 -0600 |
At 2025-01-05T13:33:02-0500, Thomas Dickey wrote: > On Sun, Jan 05, 2025 at 12:17:15PM -0600, G. Branden Robinson wrote: > > At 2025-01-05T13:06:31-0500, Bill Gray wrote: > > > On 1/5/25 11:23, G. Branden Robinson wrote: > > > > 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. > > Both programs look fine to me, but I don't replace the system > (n)curses, but rather use the test-packages whose build-scripts are in > the "packages" directory. I'm not replacing the system ncurses, but installing to "$HOME/ncurses-HEAD/". > bkgd: > linux-vdso.so.1 (0x00007ffc5b99a000) > libncursesw6.so.6 => /lib/x86_64-linux-gnu/libncursesw6.so.6 > (0x00007f43130c7000) > libtinfow6.so.6 => /lib/x86_64-linux-gnu/libtinfow6.so.6 > (0x00007f431308c000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f4312eab000) > /lib64/ld-linux-x86-64.so.2 (0x00007f431313b000) Hmm. ldd is a red herring for me. When I reinstall ncurses "HEAD", my ldd output doesn't change. (I seem to remember reading a cautionary note that ldd itself could be a vector for security attacks due to the fact that it tries to dynamically resolve which ELF objects to load. But I seem to be getting less dynamism than I expected.) LD_LIBRARY_PATH seems to work in general, though. I know because when I let my ordinary environment, which preferentially looks in $HOME/ncurses-HEAD, prevail, neomutt core dumps with modern ncurses. I have to defeat my LD_LIBRARY_PATH just for that program. $ make cc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 bkgd.c -o bkgd -lncurses -ltinfo cc -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/home/branden/ncurses-HEAD/include/ncursesw -I/home/branden/ncurses-HEAD/include bkgrnd.c -o bkgrnd -L/home/branden/ncurses-HEAD/lib -lncursesw -ltinfow -ldb Any suggestions for where to look for the cause of the trouble? > and defining NCURSES_WIDECHAR when compiling. Hmm, I use "./configure --enable-widec". Is that different? I'm attaching my scripts for configuring and rebuilding ncurses; let me know if anything looks stupid. While I'm at it I'll include my Makefile for my examples. Very simple. Very crude. > I have seen comments that ncurses-examples aren't simple... People may have noticed that I contribute a lot of patches to the man pages, so often I need to write something micro-targeted at a specific API call. Often, I want to see what the library does with invalid inputs. Your test programs and examples have value, but they're more like integration tests and demos. Regards, Branden
remake-ncurses.sh
Description: remake-ncurses.sh
config-ncurses
Description: config-ncurses
Makefile
Description: Makefile
signature.asc
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |