nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

Are extended terminfo files being correctly parsed? #129

Open mlabbe opened 4 years ago

mlabbe commented 4 years ago

Code contains #define TI_ALT_MAGIC 542, which is the alternative header for terminfo "extended storage format". This is ultimately used to correctly calculate the strings offset into the compiled terminfo database.

However, term(5) states that the alt magic is 0542, which is octal. TI_ALT_MAGIC should be set to (int)354, or prefixed with a zero.

I don't have any extended storage format terminfo files handy, but I am happy to test if you point me to where I can get some.

nsf commented 4 years ago

See: https://github.com/nsf/termbox-go/issues/185#issuecomment-370141243

Yes indeed docs mention octal, but it's different in actual files. Weird.

mlabbe commented 4 years ago

Huh. Apparently it's been acknowledged by the manpage author. I went to report it upstream but it seems to be known.

https://lists.gnu.org/archive/html/bug-ncurses/2019-01/msg00031.html