#include <curses.h> extern TERMINAL *cur_term;
The external variable cur_term to identifies the record in the terminfo associated with the terminal currently in use.
set_curterm(3XCURSES), tigetflag(3XCURSES)