tmp = termw->core.background_pixel; if(screen->cursorcolor == screen->foreground) screen->cursorcolor = tmp; termw->core.background_pixel = screen->foreground; screen->foreground = tmp;  EXCHANGE( screen->mousecolor,    screen->mousecolorback, tmp ) EXCHANGE( NormalGC(screen),      ReverseGC(screen),      tmpGC ) EXCHANGE( NormalBoldGC(screen),  ReverseBoldGC(screen),  tmpGC )  #ifndef NO_ACTIVE_ICON tmpGC = screen->iconVwin.normalGC; screen->iconVwin.normalGC = screen->iconVwin.reverseGC; screen->iconVwin.reverseGC = tmpGC;  tmpGC = screen->iconVwin.normalboldGC; screen->iconVwin.normalboldGC = screen->iconVwin.reverseboldGC; screen->iconVwin.reverseboldGC = tmpGC; #endif   recolor_cursor (screen->pointer_cursor, screen->mousecolor, screen->mousecolorback); recolor_cursor (screen->arrow, screen->mousecolor, screen->mousecolorback);  termw->misc.re_verse = !termw->misc.re_verse;  XDefineCursor(screen->display, VWindow(screen), screen->pointer_cursor); #if OPT_TEK4014 if(tek) XDefineCursor(screen->display, tek, screen->arrow); #endif  if(screen->scrollWidget) ScrollBarReverseVideo(screen->scrollWidget);  XSetWindowBackground(screen->display, VWindow(screen), termw->core.background_pixel);   XSetWindowBackground(screen->display, VShellWindow, termw->core.background_pixel);  #if OPT_TEK4014 if(tek) { TekReverseVideo(screen); } #endif XClearWindow(screen->display, VWindow(screen)); ScrnRefresh (screen, 0, 0, screen->max_row + 1, screen->max_col + 1, False); #if OPT_TEK4014 if(screen->Tshow) { XClearWindow(screen->display, tek); TekExpose((Widget)NULL, (XEvent *)NULL, (Region)NULL); } #endif ReverseOldColors(); update_reversevideo(); }
ReverseVideo (XtermWidget termw){	register TScreen *screen = &termw->screen;	GC tmpGC;	Pixel tmp;#if OPT_TEK4014	Window tek = TWindow(screen);#endif	/*	 * Swap SGR foreground and background colors.  By convention, these are	 * the colors assigned to "black" (SGR #0) and "white" (SGR #7).  Also,	 * SGR #8 and SGR #15 are the bold (or bright) versions of SGR #0 and	 * #7, respectively.	 *	 * We don't swap colors that happen to match the screen's foreground	 * and background because that tends to produce bizarre effects.	 */	if_OPT_ISO_COLORS(screen,{		EXCHANGE( screen->Acolors[0], screen->Acolors[7],  tmp )		EXCHANGE( screen->Acolors[8], screen->Acolors[15], tmp )	})