usr.bin/ex/ex_subr.c
/*
 * An interrupt occurred.  Drain any output which
 * is still in the output buffering pipeline.
 * Catch interrupts again.  Unless we are in visual
 * reset the output state (out of -nl mode, e.g).
 * Then like a normal error (with the \n before Interrupt
 * suppressed in visual mode).
 */
An interrupt occurred.  Drain any output which
is still in the output buffering pipeline.
Catch interrupts again.  Unless we are in visual
reset the output state (out of -nl mode, e.g).
Then like a normal error (with the \n before Interrupt
suppressed in visual mode).
An interrupt occurred . Drain any output which is still in the output buffering pipeline . Catch interrupts again . Unless we are in visual reset the output state ( out of - nl mode e . g ) . Then like a normal error ( with the \ n before Interrupt suppressed in visual mode ) .
void
onintr()
{
#ifndef CBREAK
	signal(SIGINT, onintr);
#else
	signal(SIGINT, inopen ? vintr : onintr);
#endif
	alarm(0);	
	draino();
	if (!inopen) {
		pstop();
		setlastchar('\n');
#ifdef CBREAK
	}
#else
	} else
		vraw();
#endif
	error("\nInterrupt" + inopen);
}
void onintr ( ) { #ifndef CBREAK signal ( SIGINT , onintr ) ; #else signal ( SIGINT , inopen ? vintr : onintr ) ; #endif alarm ( 0 ) ; draino ( ) ; if ( ! inopen ) { pstop ( ) ; setlastchar ( ' \n ' ) ; #ifdef CBREAK } #else 
	} else vraw ( ) ; #endif 
	error("\nInterrupt" + inopen); }
An interrupt occurred.
An interrupt occurred .
/* in case we were called from map */