Log Message: se ncurses is_keypad function rather than directly looking at the WINDOW structure. Include <term.h> when needed and rename lines and columns vars to avoid conflicts. Builds and works with NetBSD-8 curses, so use mk/curses.buildlink3.mk and test for getsyx(3) in curses rather than indescriminately linking to ncurses.