sabotage-linux / netbsd-curses

libcurses and dependencies taken from netbsd and brought into a portable shape (at least to musl or glibc)
Other
148 stars 14 forks source link

tic works differently than ncurses'. #19

Open rofl0r opened 7 years ago

rofl0r commented 7 years ago

investigating this issue here: https://github.com/martanne/dvtm/issues/42 and reading the manpage of our tic and ncurses tic (as well as studying the behaviour with strace) it turned out that there's a fundamental difference between the two.

unlike ncurses, the terminfo database is not a directory structure, that means you can not add a single terminfo entry by moving it into some structure. if you want to add compiled terminfo descriptions, the entire terminfo.cdb file must be re-generated in a single call from a single input file. this may be inconvenient in the current situation that there are a small number of packages that ship their own terminfo descriptions and expect the ncurses behaviour from tic. a solution might be to ship a tool that can join several .cdb files into one, or to change the code in netbsd-curses to iterate over all cdb files found in a specific directory, or to ship all terminfo descriptions of said small number of packages as part of netbsd-curses (this might become unpractical if one or more of those packages tend to change their descriptions regularly).

rofl0r commented 7 years ago

it should be noted that in the past it seemed to be common practice that packages that required their own terminfo description tried to push them into the "global" terminfo database that is shipped together with ncurses. notable examples are screen, tmux, xterm, suckless terminal (st). so far the only known packages that don't are urxvt and dvtm.