LINES — number of lines on terminal screen
#include <curses.h>
extern int LINES;
The external variable LINES indicates the number of lines on the terminal screen.
initscr(3X), <curses.h>.
First released in X/Open Curses, Issue 4.