case 20:			        cr_lf_return = state; break;
static void toggle_mode (int mode, int query, int state) {    if (query) switch (mode) {      case 1:			       /* application cursor keys */	app_cursor_keys = state;	break;      case 2:			       /* VT52 mode */	vt52_mode = !state;	break;      case 3:			       /* 80/132 columns */	deselect();	request_resize (state ? 132 : 80, rows, 1);	reset_132 = state;	break;      case 5:			       /* reverse video */	rvideo = state;	seen_disp_event = TRUE;	if (state) term_update();	break;      case 6:			       /* DEC origin mode */	dec_om = state;	break;      case 7:			       /* auto wrap */	wrap = state;	break;      case 25:			       /* enable/disable cursor */	compatibility(VT220);	cursor_on = state;	seen_disp_event = TRUE;	break;      case 47:			       /* alternate screen */	compatibility(OTHER);	deselect();	swap_screen (state);	disptop = scrtop;	break;    } else switch (mode) {      case 4:			       /* set insert mode */	compatibility(VT102);	insert = state;	break;      case 12:			       /* set echo mode */	/* 	 * This may be very good in smcup and rmcup (or smkx & rmkx) if you	 * have a long RTT and the telnet client/daemon doesn't understand	 * linemode.	 *	 * DONT send TS_RECHO/TS_LECHO; the telnet daemon tries to fix the	 * tty and _really_ confuses some programs.	 */	compatibility(VT220);        ldisc = (state? &ldisc_simple : &ldisc_term);	break;    }}