ncurses 中的 COLS 与 getmaxx

COLS vs getmaxx in ncurses

修补 ncurses;似乎无法找到为什么我想使用 getmaxyx() 而不是 LINES 和 COLS,反之亦然。

在我看来,LINES 和 COLS 已经由 initscr() 初始化,那么我为什么要执行调用 getmaxyx() 和设置新变量的额外步骤?

LINES and COLS are the size of the screen, while getmaxyx给出了window的大小。 curses 应用程序可以有多个 windows(很少超过一个屏幕)。