~mdw
/
sw-tools
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix signal handlers so they don't corrupt `errno'.
[sw-tools]
/
src
/
pres_curses.c
diff --git
a/src/pres_curses.c
b/src/pres_curses.c
index
a134eac
..
0901df5
100644
(file)
--- a/
src/pres_curses.c
+++ b/
src/pres_curses.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: pres_curses.c,v 1.
1 1999/06/02 16:53:35
mdw Exp $
+ * $Id: pres_curses.c,v 1.
2 1999/06/24 15:51:16
mdw Exp $
*
* Curses-based output presentation
*
*
* Curses-based output presentation
*
@@
-29,8
+29,11
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: pres_curses.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: pres_curses.c,v $
- * Revision 1.1 1999/06/02 16:53:35 mdw
- * Initial revision
+ * 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.
*
*/
*
*/
@@
-121,7
+124,9
@@
static void sizes(void)
#ifdef SIGTSTP
static void sig_tstp(int s)
{
#ifdef SIGTSTP
static void sig_tstp(int s)
{
+ int e = errno;
endwin();
endwin();
+ errno = e;
raise(SIGSTOP);
}
#endif
raise(SIGSTOP);
}
#endif
@@
-131,7
+136,9
@@
static void sig_tstp(int s)
#ifdef SIGTSTP
static void sig_cont(int s)
{
#ifdef SIGTSTP
static void sig_cont(int s)
{
+ int e = errno;
wrefresh(curscr);
wrefresh(curscr);
+ errno = e;
}
#endif
}
#endif
@@
-142,6
+149,8
@@
static void sig_cont(int s)
static void sig_winch(int s)
{
cwin *c;
static void sig_winch(int s)
{
cwin *c;
+ int e = errno;
+
endwin();
refresh();
sizes();
endwin();
refresh();
sizes();
@@
-153,6
+162,7
@@
static void sig_winch(int s)
wnoutrefresh(c->s);
}
doupdate();
wnoutrefresh(c->s);
}
doupdate();
+ errno = e;
}
#endif
}
#endif