savemodes(termw) XtermWidget termw;
savemodes(XtermWidget termw)
savemodes(termw)    XtermWidget termw;{	register TScreen	*screen	= &termw->screen;	register int i;	for (i = 0; i < nparam; i++) {		switch (param[i]) {		case 1:			/* DECCKM			*/			DoSM(DP_DECCKM, termw->keyboard.flags & MODE_DECCKM);			break;		case 3:			/* DECCOLM			*/			if(screen->c132)			    DoSM(DP_DECCOLM, termw->flags & IN132COLUMNS);			break;		case 4:			/* DECSCLM (slow scroll)	*/			DoSM(DP_DECSCLM, termw->flags & SMOOTHSCROLL);			break;		case 5:			/* DECSCNM			*/			DoSM(DP_DECSCNM, termw->flags & REVERSE_VIDEO);			break;		case 6:			/* DECOM			*/			DoSM(DP_DECOM, termw->flags & ORIGIN);			break;		case 7:			/* DECAWM			*/			DoSM(DP_DECAWM, termw->flags & WRAPAROUND);			break;		case 8:			/* DECARM			*/			/* ignore autorepeat */			break;		case 9:			/* mouse bogus sequence */			DoSM(DP_X_X10MSE, screen->send_mouse_pos);			break;		case 40:		/* 132 column mode		*/			DoSM(DP_X_DECCOLM, screen->c132);			break;		case 41:		/* curses hack			*/			DoSM(DP_X_MORE, screen->curses);			break;		case 44:		/* margin bell			*/			DoSM(DP_X_MARGIN, screen->marginbell);			break;		case 45:		/* reverse wraparound	*/			DoSM(DP_X_REVWRAP, termw->flags & REVERSEWRAP);			break;#ifdef ALLOWLOGGING		case 46:		/* logging		*/			DoSM(DP_X_LOGGING, screen->logging);			break;#endif		case 1047:		/* alternate buffer		*/		case 47:		/* alternate buffer		*/			DoSM(DP_X_ALTSCRN, screen->alternate);			break;		case 1000:		/* mouse bogus sequence		*/		case 1001:			DoSM(DP_X_MOUSE, screen->send_mouse_pos);			break;		case 1048:			if (!termw->misc.titeInhibit) {				CursorSave(termw, &screen->sc);			}			break;		}	}}