X-Git-Url: https://git.distorted.org.uk/~mdw/sw-tools/blobdiff_plain/4840d4f156664675bd6a219b8ce35627dceac1c5..9796a7877cd1e7f6908c678e71b8fea6045ba0e7:/src/pres_curses.c diff --git a/src/pres_curses.c b/src/pres_curses.c index 81f21e5..38876e8 100644 --- a/src/pres_curses.c +++ b/src/pres_curses.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: pres_curses.c,v 1.4 1999/07/16 16:52:28 mdw Exp $ + * $Id: pres_curses.c,v 1.7 2004/04/08 01:52:19 mdw Exp $ * * Curses-based output presentation * @@ -26,23 +26,6 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: pres_curses.c,v $ - * Revision 1.4 1999/07/16 16:52:28 mdw - * `wbkdset' doesn't work so well. Use `wbkgd' instead. - * - * Revision 1.3 1999/07/16 12:49:58 mdw - * Improve exit status display. New interface from `doto' project. - * - * Revision 1.2 1999/06/24 15:51:16 mdw - * Fix signal handlers so they don't corrupt `errno'. - * - * Revision 1.1.1.1 1999/06/02 16:53:35 mdw - * Initial import. - * - */ - /*----- Header files ------------------------------------------------------*/ #include "config.h" @@ -150,15 +133,17 @@ static void sig_cont(int s) /* --- @sig_winch@ --- */ -#ifdef HAVE_WRESIZE +#ifdef SIGWINCH static void sig_winch(int s) { - cwin *c; int e = errno; +#ifdef HAVE_WRESIZE + cwin *c; + endwin(); - refresh(); + wrefresh(curscr); sizes(); for (c = cwins; c; c = c->next) { mvwin(c->w, c->top, 0); @@ -168,6 +153,10 @@ static void sig_winch(int s) wnoutrefresh(c->s); } doupdate(); +#else + endwin(); + wrefresh(curscr); +#endif errno = e; } @@ -241,7 +230,7 @@ int curses_init(archcons *a) } doupdate(); -#ifdef HAVE_WRESIZE +#ifdef SIGWINCH signal(SIGWINCH, sig_winch); #endif #ifdef SIGTSTP