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

Comparing rxvt-unicode/src/xdefaults.C (file contents):
Revision 1.154 by sf-exg, Mon May 30 18:39:04 2011 UTC vs.
Revision 1.158 by sf-exg, Fri Dec 2 09:02:05 2011 UTC

584 * Define key from XrmEnumerateDatabase. 584 * Define key from XrmEnumerateDatabase.
585 * quarks will be something like 585 * quarks will be something like
586 * "rxvt" "keysym" "0xFF01" 586 * "rxvt" "keysym" "0xFF01"
587 * value will be a string 587 * value will be a string
588 */ 588 */
589int 589static int
590rxvt_define_key (XrmDatabase *database ecb_unused, 590rxvt_define_key (XrmDatabase *database ecb_unused,
591 XrmBindingList bindings ecb_unused, 591 XrmBindingList bindings ecb_unused,
592 XrmQuarkList quarks, 592 XrmQuarkList quarks,
593 XrmRepresentation *type ecb_unused, 593 XrmRepresentation *type ecb_unused,
594 XrmValue *value, 594 XrmValue *value,
663 // parse modifiers 663 // parse modifiers
664 while (str < key) 664 while (str < key)
665 { 665 {
666 unsigned int i; 666 unsigned int i;
667 667
668 for (i=0; i < ecb_array_length (keysym_vocabulary); ++i) 668 for (i = 0; i < ecb_array_length (keysym_vocabulary); ++i)
669 { 669 {
670 if (strncmp (str, keysym_vocabulary [i].name, keysym_vocabulary [i].len) == 0) 670 if (strncmp (str, keysym_vocabulary [i].name, keysym_vocabulary [i].len) == 0)
671 { 671 {
672 state |= keysym_vocabulary[i].value; 672 state |= keysym_vocabulary[i].value;
673 str += keysym_vocabulary[i].len; 673 str += keysym_vocabulary[i].len;
690 sym = strtol (str, &end, 16); 690 sym = strtol (str, &end, 16);
691 if (*end) 691 if (*end)
692 return -1; 692 return -1;
693 } 693 }
694 694
695 wchar_t *ws = rxvt_mbstowcs (arg);
695 keyboard->register_user_translation (sym, state, arg); 696 keyboard->register_user_translation (sym, state, ws);
697 free (ws);
696 return 1; 698 return 1;
697} 699}
698 700
699# endif /* KEYSYM_RESOURCE */ 701# endif /* KEYSYM_RESOURCE */
700#endif /* NO_RESOURCES */ 702#endif /* NO_RESOURCES */
791 class_prefix[2] = NULLQUARK; 793 class_prefix[2] = NULLQUARK;
792 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ 794 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */
793 XrmEnumerateDatabase (database, name_prefix, class_prefix, 795 XrmEnumerateDatabase (database, name_prefix, class_prefix,
794 XrmEnumOneLevel, rxvt_define_key, NULL); 796 XrmEnumOneLevel, rxvt_define_key, NULL);
795# ifdef RESFALLBACK 797# ifdef RESFALLBACK
796 name_prefix[0] = XrmStringToName (RESFALLBACK);
797 name_prefix[1] = XrmStringToName ("keysym");
798 class_prefix[0] = XrmStringToName (RESFALLBACK); 798 name_prefix[0] = class_prefix[0] = XrmStringToName (RESFALLBACK);
799 class_prefix[1] = XrmStringToName ("Keysym");
800 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */ 799 /* XXX: Need to check sizeof (rxvt_t) == sizeof (XPointer) */
801 XrmEnumerateDatabase (database, name_prefix, class_prefix, 800 XrmEnumerateDatabase (database, name_prefix, class_prefix,
802 XrmEnumOneLevel, rxvt_define_key, NULL); 801 XrmEnumOneLevel, rxvt_define_key, NULL);
803# endif 802# endif
804# endif 803# endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines