DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T t

⟦0edf032b0⟧ TextFile

    Length: 841 (0x349)
    Types: TextFile
    Names: »tstp.c.new«

Derivation

└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen
    └─ ⟦this⟧ »cph85dist/new_curses/tstp.c.new« 

TextFile

# include	<signal.h>

# include	"curses.ext"

/*
 * handle stop and start signals
 *
 * 6/25/83 (Berkeley) @(#)tstp.c	1.3
 */
tstp() {

# ifdef SIGTSTP

	int ttyflags;
	int	omask;
# ifdef DEBUG
	if (outf)
		fflush(outf);
# endif
	ttyflags = _tty.sg_flags;	/* store curses state */
	mvcur(0, COLS - 1, LINES - 1, 0);
	endwin();
	fflush(stdout);
	/* reset signal handler so kill below stops us */
	signal(SIGTSTP, SIG_DFL);
#define	mask(s)	(1 << ((s)-1))
	omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
	kill(0, SIGTSTP);
	/* pc stops here */
	/* okay, we started up again. */
	sigsetmask(omask);
	signal(SIGTSTP, tstp);
	savetty();	/* re-remember the virgin state */
	_tty.sg_flags = ttyflags;	/* restore special curses state */
	ioctl(_tty_ch, TIOCSETN, &_tty);
	_puts(TI); /* should we do VS too? */
	wrefresh(curscr);
# endif	SIGTSTP
}