You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Configure script uses the strange term "termlib". It should be updated to mention termcap/terminfo since the latter are terms people actually use; "termlib" isn't.
The termlib is the terminal control library. Generally curses or ncurses these days. I believe it dives into plain termcap / terminfo if it can't use curses.
The termlib is the terminal control library. Generally curses or ncurses these days. I believe it dives into plain termcap / terminfo if it can't use curses.
Hmm. Interesting. Thanks for the info. I’ll try to dig deeper into the code, my understanding of it still very superficial.
In your "whiteboard" you describe this as have a "Perl-style" configure. I think the truth is Perl has an "rn-style" configure. This code is old and was designed to compile on a lot of diverse environments. The configure script to figure things out was I think introduced with rn, and it (among other things) figures out what code is needed for the terminal.
It's pretty effective. I got Perl 1.0.0 running last year on Centos using the configure script. If I had had to find a period automake or the like, I'd probably have been screwed.
termlib is a lower-level library than curses. Curses provides refreshable screen regions as buffers that the application updates and then commands curses to refresh the screen from the buffers. Curses examines the changes to the buffers and attempts to emit the smallest possible set of control sequences to the terminal in order to make the screen match the appearance of the buffers.
termlib is the library that obtains the terminal capabilities from the termcap/terminfo database. It has rudimentary facilities for constructing the proper ESC sequences for sequences that are parameterized, or for sequences where additional buffering characters (depending on the baud rate) are needed in order to allow a terminal sufficient time to complete the requested operation. While the operation is pending, the terminal generally isn't listening to the host interface, so commands (like clearing the screen) that take a long time to execute in the terminal are generally followed by a series of NUL pad bytes in order to give the terminal time to process the request.
curses uses termlib in order to obtain the appropriate ESC sequences for a given terminal type as described by the termcap/terminfo database. In term.h the variables tc_BC, etc., all refer to the named terminal capabilities in termcap/terminfo by the name of the capability, e.g. the bc capability describes the backspace character used by the terminal.
Activity
Eli-the-Bearded commentedon Aug 12, 2020
The
termlibis the terminal control library. Generallycursesorncursesthese days. I believe it dives into plaintermcap/terminfoif it can't usecurses.acli commentedon Aug 12, 2020
Hmm. Interesting. Thanks for the info. I’ll try to dig deeper into the code, my understanding of it still very superficial.
Eli-the-Bearded commentedon Aug 12, 2020
In your "whiteboard" you describe this as have a "Perl-style" configure. I think the truth is Perl has an "rn-style" configure. This code is old and was designed to compile on a lot of diverse environments. The configure script to figure things out was I think introduced with rn, and it (among other things) figures out what code is needed for the terminal.
It's pretty effective. I got Perl 1.0.0 running last year on Centos using the configure script. If I had had to find a period automake or the like, I'd probably have been screwed.
LegalizeAdulthood commentedon Apr 18, 2023
termlib is a lower-level library than curses. Curses provides refreshable screen regions as buffers that the application updates and then commands curses to refresh the screen from the buffers. Curses examines the changes to the buffers and attempts to emit the smallest possible set of control sequences to the terminal in order to make the screen match the appearance of the buffers.
termlib is the library that obtains the terminal capabilities from the termcap/terminfo database. It has rudimentary facilities for constructing the proper ESC sequences for sequences that are parameterized, or for sequences where additional buffering characters (depending on the baud rate) are needed in order to allow a terminal sufficient time to complete the requested operation. While the operation is pending, the terminal generally isn't listening to the host interface, so commands (like clearing the screen) that take a long time to execute in the terminal are generally followed by a series of NUL pad bytes in order to give the terminal time to process the request.
curses uses termlib in order to obtain the appropriate ESC sequences for a given terminal type as described by the termcap/terminfo database. In term.h the variables
tc_BC, etc., all refer to the named terminal capabilities in termcap/terminfo by the name of the capability, e.g. thebccapability describes the backspace character used by the terminal.