Expunge revision histories in files.
[sw-tools] / src / pres_curses.c
index 0901df5..38876e8 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: pres_curses.c,v 1.2 1999/06/24 15:51:16 mdw Exp $
+ * $Id: pres_curses.c,v 1.7 2004/04/08 01:52:19 mdw Exp $
  *
  * Curses-based output presentation
  *
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
-/*----- Revision history --------------------------------------------------* 
- *
- * $Log: pres_curses.c,v $
- * 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"
@@ -144,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);
@@ -162,6 +153,10 @@ static void sig_winch(int s)
     wnoutrefresh(c->s);
   }
   doupdate();
+#else
+  endwin();
+  wrefresh(curscr);
+#endif
   errno = e;
 }
 
@@ -228,15 +223,14 @@ int curses_init(archcons *a)
     scrollok(c->w, TRUE);
     leaveok(c->w, TRUE);
     leaveok(c->s, TRUE);
-    wbkgdset(c->s, A_STANDOUT);
-    werase(c->s);
-    mvwprintw(c->s, 0, 0, "  %s  [running]\n", c->e->arch);
+    wbkgd(c->s, A_STANDOUT);
+    mvwprintw(c->s, 0, 0, "  %s [running]\n", c->e->arch);
     wnoutrefresh(c->w);
     wnoutrefresh(c->s);
   }
   doupdate();
 
-#ifdef HAVE_WRESIZE
+#ifdef SIGWINCH
   signal(SIGWINCH, sig_winch);
 #endif
 #ifdef SIGTSTP
@@ -275,10 +269,10 @@ void curses_output(archent *e, const char *p, size_t sz)
 
 /* --- @curses_close@ --- */
 
-void curses_close(archent *e, int ok)
+void curses_close(archent *e, int ok, const char *summ)
 {
   cwin *c = e->pres;
-  mvwprintw(c->s, 0, 0, "  %s [%s]\n", e->arch, ok ? "finished" : "failed");
+  mvwprintw(c->s, 0, 0, "  %s [%s]\n", e->arch, summ);
   wrefresh(c->s);
 }