tparm dynamic variables broken

Bug #1999171 reported by Avram Lubkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ncurses (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I use the Python curses library for convenience, but this seems to be an ncurses bug as Python simply wraps the ncurses library.

As you can see from example below, the dynamic variable x gets stored as 4, but, when it's
recalled, 0 is returned instead of 4. This was on 22.04 and 20.04 with libncurses6 6.3-2.

I've confirm the behavior is correct on Fedora 36 with ncurses-libs-6.2-9.20210508. I apologize I haven't been able to narrow it down farther, but figured it would be good to get a bug logged in case someone has more insight.

```
Python 3.10.6 (main, Nov 2 2022, 18:53:38) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import curses
>>> curses.setupterm()
>>> curses.tparm(b'%p1%Px', 4)
b''
>>> curses.tparm(b'%gx%d')
b'0'
```

Revision history for this message
Thomas Dickey (dickey-his) wrote :
Revision history for this message
Avram Lubkin (avylove) wrote (last edit ):

I was able to confirm this also fails on Fedora 37 with ncurses-libs-6.3-3.20220501, so this looks like a regression in 6.3

@dickey-his, it looks like there were several changes to tparm between 6.2 and 6.3. Is it possible this could have caused the issue?
Static (uppercase) variables are working as expected, but dynamic (lowercase) variables don't seem to get set.

Seems this commit was specifically targeted at the logic, but I can't make too much sense out of it.
http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commitdiff;h=493e2f7b3fc309879f561a094fdfc15e5304b3d6

Revision history for this message
Thomas Dickey (dickey-his) wrote :

Dynamic variables are maintained as part of the currently opened terminal.
As noted, if you want to open a bug against ncurses (rather than Ubuntu packaging),
this won't get as much attention as the bug-ncurses mailing list, or the Debian package
(which Ubuntu provides without change).

Changed in ncurses (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.