Does anyone use terminfo
capabilities functions like tputs()
, tparm()
, tigetstr()
, tigetnum()
directly anymore?
I can't find any practical examples online with these low-level terminal functions.
Does everyone uses ncurses
library to control terminal and doesn't bother with this low-level code?
This low-level code is very hard to read I think.
Should I bother with this low-level code or just learn ncurses
which is a lot less overwhelming with ncurses-provided higher-level code?
If anybody knows some practical info about such low-level functions, share with me.
Does everyone uses ncurses library to control terminal and doesn't bother with this low-level code?
This is very easy to check.
First, prepare a list of function in the ncurses library. On my system that would be:
nm -D /lib64/libncurses.so.5.9 | fgrep ' T ' \
| sed 's/^[0-9A-Fa-f ]*T //' > /tmp/ncurses-functions-list
Now see how many of those are used in various programs.
for f in /usr/bin/* ; do
nm -D $f 2>/dev/null | fgrep ' U ' \
| sed 's/^ *U //' \
| fgrep -x -f - /tmp/ncurses-functions-list && echo ==== $f;
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With