VTReset(full, saved) Boolean full; Boolean saved;
VTReset(Bool full, Bool saved)
VTReset(full, saved)    Boolean full;    Boolean saved;{	register TScreen *screen = &term->screen;	if (saved) {		screen->savedlines = 0;		ScrollBarDrawThumb(screen->scrollWidget);	}	/* make cursor visible */	screen->cursor_set = ON;	/* reset scrolling region */	screen->top_marg = 0;	screen->bot_marg = screen->max_row;	bitclr(&term->flags, ORIGIN);	if_OPT_ISO_COLORS(screen,{reset_SGR_Colors();})	/* Reset character-sets to initial state */	resetCharsets(screen);	/* Reset DECSCA */	bitclr(&term->flags, PROTECTED);	screen->protected_mode = OFF_PROTECT;	if (full) {	/* RIS */		TabReset (term->tabs);		term->keyboard.flags = MODE_SRM;		if (term->screen.backarrow_key)			term->keyboard.flags |= MODE_DECBKM;		update_appcursor();		update_appkeypad();		update_decbkm();		show_8bit_control(False);		reset_decudk();		FromAlternate(screen);		ClearScreen(screen);		screen->cursor_state = OFF;		if (term->flags & REVERSE_VIDEO)			ReverseVideo(term);		term->flags = term->initflags;		update_reversevideo();		update_autowrap();		update_reversewrap();		update_autolinefeed();		screen->jumpscroll = !(term->flags & SMOOTHSCROLL);		update_jumpscroll();		if(screen->c132 && (term->flags & IN132COLUMNS)) {		        Dimension junk;			XtMakeResizeRequest(			    (Widget) term,			    (Dimension) 80*FontWidth(screen)				+ 2 * screen->border + Scrollbar(screen),			    (Dimension) FontHeight(screen)			        * (screen->max_row + 1) + 2 * screen->border,			    &junk, &junk);			XSync(screen->display, FALSE);	/* synchronize */			if(XtAppPending(app_con))				xevents();		}		CursorSet(screen, 0, 0, term->flags);		CursorSave(term, &screen->sc);	} else {	/* DECSTR */		/*		 * There's a tiny difference, to accommodate usage of xterm.		 * We reset autowrap to the resource values rather than turning		 * it off.		 *		 * FIXME: also reset DECNKM when it's implemented.		 */		term->keyboard.flags &= ~(MODE_DECCKM|MODE_KAM);		bitcpy(&term->flags, term->initflags, WRAPAROUND|REVERSEWRAP);		bitclr(&term->flags, INSERT|INVERSE|BOLD|BLINK|UNDERLINE|INVISIBLE);		if_OPT_ISO_COLORS(screen,{reset_SGR_Colors();})		update_appcursor();		update_autowrap();		update_reversewrap();		CursorSave(term, &screen->sc);		screen->sc.row =		screen->sc.col = 0;	}	longjmp(vtjmpbuf, 1);	/* force ground state in parser */}