1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  */
   6: 
   7: #ifndef lint
   8: static char sccsid[] = "@(#)tstp.c	5.1 (Berkeley) 6/7/85";
   9: #endif not lint
  10: 
  11: # include   <signal.h>
  12: 
  13: # include   "curses.ext"
  14: 
  15: /*
  16:  * handle stop and start signals
  17:  *
  18:  * @(#)tstp.c	5.1 (Berkeley) 6/7/85
  19:  */
  20: tstp() {
  21: 
  22: # ifdef SIGTSTP
  23: 
  24:     SGTTY   tty;
  25:     int omask;
  26: # ifdef DEBUG
  27:     if (outf)
  28:         fflush(outf);
  29: # endif
  30:     tty = _tty;
  31:     mvcur(0, COLS - 1, LINES - 1, 0);
  32:     endwin();
  33:     fflush(stdout);
  34:     /* reset signal handler so kill below stops us */
  35:     signal(SIGTSTP, SIG_DFL);
  36: #define mask(s) (1 << ((s)-1))
  37:     omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
  38:     kill(0, SIGTSTP);
  39:     sigblock(mask(SIGTSTP));
  40:     signal(SIGTSTP, tstp);
  41:     _tty = tty;
  42:     stty(_tty_ch, &_tty);
  43:     wrefresh(curscr);
  44: # endif	SIGTSTP
  45: }

Defined functions

Defined variables

sccsid defined in line 8; never used

Defined macros

mask defined in line 36; used 2 times
Last modified: 1985-06-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 862
Valid CSS Valid XHTML 1.0 Strict