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.53 by pcg, Sun Feb 22 12:34:53 2004 UTC vs.
Revision 1.55 by pcg, Sun Feb 22 20:08:18 2004 UTC

110 SET_LOCALE (locale); 110 SET_LOCALE (locale);
111 111
112 if (status_return == XLookupChars 112 if (status_return == XLookupChars
113 || status_return == XLookupBoth) 113 || status_return == XLookupBoth)
114 { 114 {
115 /* make sure the user can type ctrl-@, i.e. NUL */
116 if (len == 1 && *wkbuf == 0)
117 {
118 kbuf[0] = 0;
119 len = 1;
120 }
121 else
122 {
115 wkbuf[len] = 0; 123 wkbuf[len] = 0;
116 len = wcstombs ((char *)kbuf, wkbuf, KBUFSZ); 124 len = wcstombs ((char *)kbuf, wkbuf, KBUFSZ);
117 if (len < 0) 125 if (len < 0)
118 len = 0; 126 len = 0;
127 }
119 } 128 }
120 else 129 else
121 len = 0; 130 len = 0;
122 } 131 }
123 132
653 kbuf[len - 1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~')); 662 kbuf[len - 1] = (shft ? (ctrl ? '@' : '$') : (ctrl ? '^' : '~'));
654 663
655 /* escape prefix */ 664 /* escape prefix */
656 if (meta 665 if (meta
657#ifdef META8_OPTION 666#ifdef META8_OPTION
658 && (meta_char == C0_ESC) 667 && meta_char == C0_ESC
659#endif 668#endif
660 ) 669 )
661 { 670 {
662 const unsigned char ch = C0_ESC; 671 const unsigned char ch = C0_ESC;
663
664 tt_write (&ch, 1); 672 tt_write (&ch, 1);
665 } 673 }
674
666#ifdef DEBUG_CMD 675#if defined(DEBUG_CMD)
667 if (debug_key)
668 { /* Display keyboard buffer contents */ 676 /* Display keyboard buffer contents */
669 char *p; 677 unsigned char *p;
670 int i; 678 int i;
671 679
672 fprintf (stderr, "key 0x%04X [%d]: `", (unsigned int)keysym, len); 680 fprintf (stderr, "key 0x%04X [%d]: `", (unsigned int)keysym, len);
673 for (i = 0, p = kbuf; i < len; i++, p++) 681 for (i = 0, p = kbuf; i < len; i++, p++)
674 fprintf (stderr, (*p >= ' ' && *p < '\177' ? "%c" : "\\%03o"), *p); 682 fprintf (stderr, (*p >= ' ' && *p < '\177' ? "%c" : "\\%03o"), *p);
675 fprintf (stderr, "'\n"); 683 fprintf (stderr, "'\n");
676 }
677#endif /* DEBUG_CMD */ 684#endif /* DEBUG_CMD */
678 tt_write (kbuf, (unsigned int)len); 685 tt_write (kbuf, (unsigned int)len);
679} 686}
680/*}}} */ 687/*}}} */
681 688
2694 break; 2701 break;
2695#endif 2702#endif
2696 case 8: /* unofficial extension */ 2703 case 8: /* unofficial extension */
2697 xterm_seq (XTerm_title, APL_NAME "-" VERSION, CHAR_ST); 2704 xterm_seq (XTerm_title, APL_NAME "-" VERSION, CHAR_ST);
2698 break; 2705 break;
2699
2700 case XTerm_locale: /* unofficial extension */
2701 tt_printf ("%-.250s\n", locale);
2702 break;
2703 } 2706 }
2704 break; 2707 break;
2705 2708
2706 case CSI_TBC: /* 8.3.155: (0) TABULATION CLEAR */ 2709 case CSI_TBC: /* 8.3.155: (0) TABULATION CLEAR */
2707 switch (arg[0]) 2710 switch (arg[0])
3079 break; 3082 break;
3080 case XTerm_font: 3083 case XTerm_font:
3081 change_font (str); 3084 change_font (str);
3082 break; 3085 break;
3083 case XTerm_locale: 3086 case XTerm_locale:
3087 if (str[0] == '?' && !str[1])
3088 tt_printf ("%-.250s\n", locale);
3089 else
3090 {
3084 set_locale (str); 3091 set_locale (str);
3085 im_cb (); 3092 im_cb ();
3093 }
3086 break; 3094 break;
3087#if 0 3095#if 0
3088 case XTerm_dumpscreen: /* no error notices */ 3096 case XTerm_dumpscreen: /* no error notices */
3089 { 3097 {
3090 int fd; 3098 int fd;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines