ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.422 by root, Tue Oct 28 04:45:59 2008 UTC vs.
Revision 1.429 by root, Wed Nov 5 16:21:18 2008 UTC

2688 /* 8.3.110: SINGLE CHARACTER INTRODUCER */ 2688 /* 8.3.110: SINGLE CHARACTER INTRODUCER */
2689 case C1_SCI: /* ESC Z */ 2689 case C1_SCI: /* ESC Z */
2690 tt_write (ESCZ_ANSWER, sizeof (ESCZ_ANSWER) - 1); 2690 tt_write (ESCZ_ANSWER, sizeof (ESCZ_ANSWER) - 1);
2691 break; /* steal obsolete ESC [ c */ 2691 break; /* steal obsolete ESC [ c */
2692 2692
2693 /* 8.3.16: CONTROL SEQUENCE INTRODUCER */ 2693 /* 8.3.16: CONTROL SEQUENCE INTRODUCER (CSI) */
2694 case C1_CSI: /* ESC [ */ 2694 case C1_CSI: /* ESC [ */
2695 process_csi_seq (); 2695 process_csi_seq ();
2696 break; 2696 break;
2697 2697
2698 /* 8.3.90: OPERATING SYSTEM COMMAND */ 2698 /* 8.3.90: OPERATING SYSTEM COMMAND (OSC) */
2699 case C1_OSC: /* ESC ] */ 2699 case C1_OSC: /* ESC ] */
2700 process_osc_seq (); 2700 process_osc_seq ();
2701 break; 2701 break;
2702 2702
2703 /* 8.3.106: RESET TO INITIAL STATE */ 2703 /* 8.3.106: RESET TO INITIAL STATE (RIS) */
2704 case 'c': 2704 case 'c':
2705 mbstate.reset (); 2705 mbstate.reset ();
2706 scr_poweron (); 2706 scr_poweron ();
2707 scrollBar.show (1); 2707 scrollBar.show (1);
2708 break; 2708 break;
2763 2763
2764 nargs = 0; 2764 nargs = 0;
2765 2765
2766 priv = 0; 2766 priv = 0;
2767 ch = cmd_getc (); 2767 ch = cmd_getc ();
2768 if (ch >= '<' && ch <= '?') 2768 if ((ch >= '<' && ch <= '?') || ch == '!')
2769 { 2769 {
2770 /* '<' '=' '>' '?' */ 2770 /* '<' '=' '>' '?' '!' */
2771 priv = ch; 2771 priv = ch;
2772 ch = cmd_getc (); 2772 ch = cmd_getc ();
2773 } 2773 }
2774 2774
2775 /* read any numerical arguments */ 2775 /* read any numerical arguments */
2829 2829
2830 case '?': 2830 case '?':
2831 if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't') 2831 if (ch == 'h' || ch == 'l' || ch == 'r' || ch == 's' || ch == 't')
2832 process_terminal_mode (ch, priv, nargs, arg); 2832 process_terminal_mode (ch, priv, nargs, arg);
2833 break; 2833 break;
2834
2835 case '!':
2836 if (ch == CSI_70)
2837 {
2838 /* DECSTR: soft terminal reset, used by our terminfo since 9.06 */
2839 scr_soft_reset ();
2840
2841 static const int pm_h[] = { 7, 25 };
2842 static const int pm_l[] = { 1, 3, 4, 5, 6, 9, 66, 1000, 1001, 1049 };
2843
2844 process_terminal_mode ('h', 0, sizeof (pm_h) / sizeof (pm_h[0]), pm_h);
2845 process_terminal_mode ('l', 0, sizeof (pm_l) / sizeof (pm_l[0]), pm_l);
2834 } 2846 }
2847 break;
2848 }
2849
2835 return; 2850 return;
2836 } 2851 }
2837 2852
2838 switch (ch) 2853 switch (ch)
2839 { 2854 {
3385 break; 3400 break;
3386 case URxvt_Color_IT: 3401 case URxvt_Color_IT:
3387 process_color_seq (op, Color_IT, str, resp); 3402 process_color_seq (op, Color_IT, str, resp);
3388 break; 3403 break;
3389#endif 3404#endif
3405 case URxvt_Color_border:
3406 process_color_seq (op, Color_border, str, resp);
3407 break;
3390#if ENABLE_TRANSPARENCY 3408#if ENABLE_TRANSPARENCY
3391 case URxvt_Color_tint: 3409 case URxvt_Color_tint:
3392 process_color_seq (op, Color_tint, str, resp); 3410 process_color_seq (op, Color_tint, str, resp);
3393 { 3411 {
3394 bool changed = false; 3412 bool changed = false;
3569 static const struct 3587 static const struct
3570 { 3588 {
3571 const int argval; 3589 const int argval;
3572 const unsigned long bit; 3590 const unsigned long bit;
3573 } argtopriv[] = { 3591 } argtopriv[] = {
3574 { 1, PrivMode_aplCUR }, 3592 { 1, PrivMode_aplCUR }, // DECCKM
3575 { 2, PrivMode_vt52 }, 3593 { 2, PrivMode_vt52 },
3576 { 3, PrivMode_132 }, 3594 { 3, PrivMode_132 }, // DECCOLM
3577 { 4, PrivMode_smoothScroll }, 3595 { 4, PrivMode_smoothScroll }, // DECSCLM
3578 { 5, PrivMode_rVideo }, 3596 { 5, PrivMode_rVideo }, // DECSCNM
3579 { 6, PrivMode_relOrigin }, 3597 { 6, PrivMode_relOrigin }, // DECOM
3580 { 7, PrivMode_Autowrap }, 3598 { 7, PrivMode_Autowrap }, // DECAWM
3581 // 8, bi-directional support mode 3599 // 8, auto-repeat keys // DECARM
3582 { 9, PrivMode_MouseX10 }, 3600 { 9, PrivMode_MouseX10 },
3583 // 18, 19 printing-related 3601 // 18 end FF to printer after print screen
3602 // 19 Print screen prints full screen/scorll region
3584 { 25, PrivMode_VisibleCursor }, 3603 { 25, PrivMode_VisibleCursor }, // cnorm/cvvis/civis
3585#ifdef scrollBar_esc 3604#ifdef scrollBar_esc
3586 { scrollBar_esc, PrivMode_scrollBar }, 3605 { scrollBar_esc, PrivMode_scrollBar },
3587#endif 3606#endif
3588 { 35, PrivMode_ShiftKeys }, // rxvt extension 3607 { 35, PrivMode_ShiftKeys }, // rxvt extension
3608 // 38, tektronix mode // DECTEK
3589 { 40, PrivMode_132OK }, 3609 { 40, PrivMode_132OK },
3590 // 41 xterm more fixes NYI 3610 // 41 xterm more fixes NYI
3591 // 45 margin bell NYI 3611 // 45 margin bell NYI
3592 // 46 start logging 3612 // 46 start logging
3593 { 47, PrivMode_Screen }, 3613 { 47, PrivMode_Screen },
3594 { 66, PrivMode_aplKP }, 3614 { 66, PrivMode_aplKP }, // DECPAM/DECPNM
3595#ifndef NO_BACKSPACE_KEY 3615#ifndef NO_BACKSPACE_KEY
3596 { 67, PrivMode_BackSpace }, 3616 { 67, PrivMode_BackSpace }, // DECBKM
3597#endif 3617#endif
3598 { 1000, PrivMode_MouseX11 }, 3618 { 1000, PrivMode_MouseX11 },
3599 { 1002, PrivMode_MouseBtnEvent }, 3619 { 1002, PrivMode_MouseBtnEvent },
3600 { 1003, PrivMode_MouseAnyEvent }, 3620 { 1003, PrivMode_MouseAnyEvent },
3601 { 1010, PrivMode_TtyOutputInh }, // rxvt extension 3621 { 1010, PrivMode_TtyOutputInh }, // rxvt extension
3640 3660
3641 scr_touch (true); 3661 scr_touch (true);
3642 break; 3662 break;
3643#endif 3663#endif
3644 case 1048: /* alternative cursor save */ 3664 case 1048: /* alternative cursor save */
3645 case 1049:
3646 if (option (Opt_secondaryScreen)) 3665 if (option (Opt_secondaryScreen))
3647 if (mode == 0) 3666 if (mode == 0)
3648 scr_cursor (RESTORE); 3667 scr_cursor (RESTORE);
3649 else if (mode == 1) 3668 else if (mode == 1)
3650 scr_cursor (SAVE); 3669 scr_cursor (SAVE);
3663 */ 3682 */
3664 set_privmode (PrivMode_vt52, 1); 3683 set_privmode (PrivMode_vt52, 1);
3665 break; 3684 break;
3666 case 3: /* 80/132 */ 3685 case 3: /* 80/132 */
3667 if (priv_modes & PrivMode_132OK) 3686 if (priv_modes & PrivMode_132OK)
3668 {
3669 scr_poweron ();
3670 set_widthheight (((state ? 132 : 80) * fwidth), 24 * fheight); 3687 set_widthheight ((state ? 132 : 80) * fwidth, 24 * fheight);
3671 }
3672 break; 3688 break;
3673 case 4: /* smooth scrolling */ 3689 case 4: /* smooth scrolling */
3674 set_option (Opt_jumpScroll, !state); 3690 set_option (Opt_jumpScroll, !state);
3675 break; 3691 break;
3676 case 5: /* reverse video */ 3692 case 5: /* reverse video */
3718 priv_modes &= arg[i] == 1003 ? ~PrivMode_MouseBtnEvent : ~PrivMode_MouseAnyEvent; 3734 priv_modes &= arg[i] == 1003 ? ~PrivMode_MouseBtnEvent : ~PrivMode_MouseAnyEvent;
3719 vt_emask_mouse = PointerMotionMask; 3735 vt_emask_mouse = PointerMotionMask;
3720 } 3736 }
3721 else 3737 else
3722 vt_emask_mouse = NoEventMask; 3738 vt_emask_mouse = NoEventMask;
3739
3723 vt_select_input (); 3740 vt_select_input ();
3724 break; 3741 break;
3725 case 1010: /* scroll to bottom on TTY output inhibit */ 3742 case 1010: /* scroll to bottom on TTY output inhibit */
3726 set_option (Opt_scrollTtyOutput, !state); 3743 set_option (Opt_scrollTtyOutput, !state);
3727 break; 3744 break;
3728 case 1011: /* scroll to bottom on key press */ 3745 case 1011: /* scroll to bottom on key press */
3729 set_option (Opt_scrollTtyKeypress, state); 3746 set_option (Opt_scrollTtyKeypress, state);
3730 break; 3747 break;
3731 case 1047: /* secondary screen w/ clearing last */ 3748 case 1047: /* secondary screen w/ clearing last */
3732 if (option (Opt_secondaryScreen)) 3749 if (option (Opt_secondaryScreen))
3733 if (current_screen != PRIMARY) 3750 if (!state)
3734 scr_erase_screen (2); 3751 scr_erase_screen (2);
3752
3735 scr_change_screen (state); 3753 scr_change_screen (state);
3736 break; 3754 break;
3737 case 1049: /* secondary screen w/ clearing first */ 3755 case 1049: /* secondary screen w/ clearing first */
3756 if (option (Opt_secondaryScreen))
3757 if (state)
3758 scr_cursor (SAVE);
3759
3738 scr_change_screen (state); 3760 scr_change_screen (state);
3761
3739 if (option (Opt_secondaryScreen)) 3762 if (option (Opt_secondaryScreen))
3740 if (current_screen != PRIMARY) 3763 if (state)
3741 scr_erase_screen (2); 3764 scr_erase_screen (2);
3765 else
3766 scr_cursor (RESTORE);
3742 break; 3767 break;
3743 default: 3768 default:
3744 break; 3769 break;
3745 } 3770 }
3746 } 3771 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines