tHave bgetch() under Unix ignore KEY_RESIZE and ERR returns from getch(), so that resizing the window doesn't cancel any "press any key" prompts or the like. - vaccinewars - be a doctor and try to vaccinate the world
 (HTM) git clone git://src.adamsgaard.dk/vaccinewars
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 574051390dc6bfb24f9cf35c036d069c357b3a3c
 (DIR) parent b23da53b00549c97cfb60fb8bcea0eee0ec06ef4
 (HTM) Author: Ben Webb <ben@salilab.org>
       Date:   Sun, 26 Jan 2003 19:35:22 +0000
       
       Have bgetch() under Unix ignore KEY_RESIZE and ERR returns from getch(),
       so that resizing the window doesn't cancel any "press any key" prompts or
       tthe like.
       
       
       Diffstat:
         M src/cursesport/cursesport.c         |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/src/cursesport/cursesport.c b/src/cursesport/cursesport.c
       t@@ -253,7 +253,9 @@ int bgetch()
          int c;
        
          c = getch();
       -  while (c == '\f') {
       +  /* N.B. Ignore ERR, which seems to be sometimes generated by screen
       +   * resize events; we deal with these by trapping SIGWINCH instead */
       +  while (c == '\f' || c == KEY_RESIZE || c == ERR) {
            wrefresh(curscr);
            c = getch();
          }