case LYK_TRACE_TOGGLE :	        WWW_TraceFlag = ! WWW_TraceFlag; if (LYOpenTraceLog()) HTUserMsg(WWW_TraceFlag ? TRACE_ON : TRACE_OFF); break ;
case LYK_TRACE_TOGGLE :	 handle_LYK_TRACE_TOGGLE(); break;
PUBLIC int HTCheckForInterrupt NOARGS{    int c;#ifndef VMS /* UNIX stuff: */#ifndef USE_SLANG    struct timeval socket_timeout;    int ret = 0;    fd_set readfds;#endif /* !USE_SLANG */    if (fake_zap > 0) {	fake_zap--;	CTRACE(tfp, "\r *** Got simulated 'Z' ***\n");	CTRACE_FLUSH(tfp);	CTRACE_SLEEP(AlertSecs);	return((int)TRUE);    }    /** Curses or slang setup was not invoked **/    if (DontCheck())	return((int)FALSE);#ifdef USE_SLANG    /** No keystroke was entered	Note that this isn't taking possible SOCKSification	and the socks_flag into account, and may fail on the	slang library's select() when SOCKSified. - FM **/#ifdef DJGPP_KEYHANDLER    if (0 == _bios_keybrd(_NKEYBRD_READY))#else    if (0 == SLang_input_pending(0))#endif /* DJGPP_KEYHANDLER */	return(FALSE);#else /* Unix curses: */    socket_timeout.tv_sec = 0;    socket_timeout.tv_usec = 100;    FD_ZERO(&readfds);    FD_SET(0, &readfds);#ifdef SOCKS    if (socks_flag)	ret = Rselect(1, (void *)&readfds, NULL, NULL,		      &socket_timeout);    else#endif /* SOCKS */	ret = select(1, (void *)&readfds, NULL, NULL,		     &socket_timeout);    /** Suspended? **/    if ((ret == -1) && (errno == EINTR))	 return((int)FALSE);    /** No keystroke was entered? **/    if (!FD_ISSET(0,&readfds))	 return((int)FALSE);#endif /* USE_SLANG */#if defined (DOSPATH) && defined (NCURSES)    nodelay(stdscr,TRUE);#endif /* DOSPATH */    /*     * 'c' contains whatever character we're able to read from keyboard     */    c = LYgetch();#if defined (DOSPATH) && defined (NCURSES)    nodelay(stdscr,FALSE);#endif /* DOSPATH */#else /* VMS: */    extern int typeahead();    if (fake_zap > 0) {	fake_zap--;	CTRACE(tfp, "\r *** Got simulated 'Z' ***\n");	CTRACE_FLUSH(tfp);	CTRACE_SLEEP(AlertSecs);	return((int)TRUE);    }    /** Curses or slang setup was not invoked **/    if (DontCheck())	  return((int)FALSE);    /** Control-C or Control-Y and a 'N'o reply to exit query **/    if (HadVMSInterrupt) {	HadVMSInterrupt = FALSE;	return((int)TRUE);    }    /*     * 'c' contains whatever character we're able to read from keyboard     */    c = typeahead();#endif /* !VMS */    /*     * 'c' contains whatever character we're able to read from keyboard     */	/** Keyboard 'Z' or 'z', or Control-G or Control-C **/    if (TOUPPER(c) == 'Z' || c == 7 || c == 3)	return((int)TRUE);	/* There is a subset of mainloop() actions available at this stage:	** no new getfile() cyrcle possible until the previous finished.	** Currently we have scrolling in partial mode and toggling of trace log.	*/    switch (keymap[c+1])    {    case LYK_TRACE_TOGGLE :	       /*  Toggle TRACE mode. */	WWW_TraceFlag = ! WWW_TraceFlag;	if (LYOpenTraceLog())	    HTUserMsg(WWW_TraceFlag ? TRACE_ON : TRACE_OFF);	break ;    default :#ifdef DISP_PARTIAL	if (display_partial && (NumOfLines_partial > 2))	/* OK, we got several lines from new document and want to scroll... */	{	    int res;	    switch (keymap[c+1])	    {	    case LYK_FASTBACKW_LINK :		if (Newline_partial <= (display_lines)+1) {		    Newline_partial -= display_lines ;		} else if ((res =			    HTGetLinkOrFieldStart(-1,						  &Newline_partial, NULL,						  -1, TRUE)) == LINK_LINE_FOUND) {		    Newline_partial++;		} else if (res == LINK_DO_ARROWUP) {		    Newline_partial -= display_lines ;		}		break;	    case LYK_FASTFORW_LINK :		if (HText_canScrollDown()) {		    /* This is not an exact science... - kw */		    if ((res =			HTGetLinkOrFieldStart(HText_LinksInLines(HTMainText,								 Newline_partial,								 display_lines)					      - 1,					      &Newline_partial, NULL,					      1, TRUE)) == LINK_LINE_FOUND) {			Newline_partial++;		    }		}		break;	    case LYK_PREV_PAGE :		if (Newline_partial > 1)		    Newline_partial -= display_lines ;		break ;	    case LYK_NEXT_PAGE :		if (HText_canScrollDown())		    Newline_partial += display_lines ;		break ;	    case LYK_UP_HALF :		if (Newline_partial > 1)		    Newline_partial -= (display_lines/2) ;		break ;	    case LYK_DOWN_HALF :		if (HText_canScrollDown())		    Newline_partial += (display_lines/2) ;		break ;	    case LYK_UP_TWO :		if (Newline_partial > 1)		    Newline_partial -= 2 ;		break ;	    case LYK_DOWN_TWO :		if (HText_canScrollDown())		    Newline_partial += 2 ;		break ;	    case LYK_HOME:		if (Newline_partial > 1)		    Newline_partial = 1;		break;	    case LYK_END:		if (HText_canScrollDown())		    Newline_partial = HText_getNumOfLines() - display_lines + 1;		    /* calculate for "current" bottom value */		break;	    case LYK_REFRESH :		break ;	    default :		/** Other or no keystrokes **/		return ((int)FALSE) ;	    } /* end switch */	    if (Newline_partial < 1)		Newline_partial = 1;	    NumOfLines_partial = HText_getNumOfLines();	    HText_pageDisplay(Newline_partial, "");	}#endif /* DISP_PARTIAL */	break;    } /* end switch */    /** Other or no keystrokes **/    return((int)FALSE);}