usr.bin/ex/ex_subr.c
/*
 * We have just gotten a susp.  Suspend and prepare to resume.
 */
We have just gotten a susp.  Suspend and prepare to resume.
We have just gotten a susp . Suspend and prepare to resume .
void
onsusp()
{
	ttymode f;
	struct winsize win;
	f = setty(normf);
	vnfl();
	putpad(TE);
	flush();
	(void) sigsetmask(0);
	signal(SIGTSTP, SIG_DFL);
	kill(0, SIGTSTP);
	signal(SIGTSTP, onsusp);
	vcontin(0);
	ignore(setty(f));
	if (!inopen)
		error((char *) 0);
	else {
#ifdef	TIOCGWINSZ
		if (ioctl(0, TIOCGWINSZ, &win) >= 0)
			if (win.ws_row != winsz.ws_row ||
			    win.ws_col != winsz.ws_col)
				winch();
#endif
		if (vcnt < 0) {
			vcnt = -vcnt;
			if (state == VISUAL)
				vclear();
			else if (state == CRTOPEN)
				vcnt = 0;
		}
		vdirty(0, LINES);
		vrepaint(cursor);
	}
}
void onsusp ( ) { ttymode f ; struct winsize win ; f = setty ( normf ) ; vnfl ( ) ; putpad ( TE ) ; flush ( ) ; ( void ) sigsetmask ( 0 ) ; signal ( SIGTSTP , SIG_DFL ) ; kill ( 0 , SIGTSTP ) ; signal ( SIGTSTP , onsusp ) ; vcontin ( 0 ) ; ignore ( setty ( f ) ) ; if ( ! inopen ) error ( ( char * ) 0 ) ; else { #ifdef TIOCGWINSZ if ( ioctl ( 0 , TIOCGWINSZ , & win ) >= 0 ) if ( win . ws_row != winsz . ws_row || win . ws_col != winsz . ws_col ) winch ( ) ; #endif if ( vcnt < 0 ) { vcnt = - vcnt ; if ( state == VISUAL ) vclear ( ) ; else if ( state == CRTOPEN ) vcnt = 0 ; } vdirty ( 0 , LINES ) ; vrepaint ( cursor ) ; } }
We have just gotten a susp.
We have just gotten a susp .
/* the pc stops here */