Trapping control-C in Newstar programs -------------------------------------- (contributed by JPH 941005, gleaned from wndpar_x.fun, wngex.for) INCLUDE WXH_DEF ... XHCC(0)=1 ! inhibit ... XHCC(0)=0 ! clear IF (XHCC(1) .NE.0) THEN ! was a control-C caught? XHCC(1)=0 ENDIF This code has been used to create module WNGCC with entry points WNGCCD disable control-C WNGCCE enable control-C LOGICAL WNGCCC check and reset 'control-c seen' status and several other entry points to check, count and reset the number of interrupts seen. The implementation is in entry point WNGEX0 in wngex.for. This routine is declared the handler for signal SIGINT by wngsxh.fsc. Its action is very simple: if xhcc(0) !=0 xhcc(1)+=1 else fall through to WNGEX endif