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.111 by ayin, Fri Aug 3 23:32:14 2007 UTC vs.
Revision 1.113 by ayin, Sat Sep 8 20:54:51 2007 UTC

566 rs[optList[entry].doff] = flag; 566 rs[optList[entry].doff] = flag;
567 } 567 }
568 } 568 }
569 else 569 else
570#ifdef KEYSYM_RESOURCE 570#ifdef KEYSYM_RESOURCE
571 /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ 571 if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1))
572 if (rxvt_Str_match (opt, "keysym."))
573 { 572 {
574 const char *str = argv[++i]; 573 const char *str = argv[++i];
575 574
576 if (str != NULL) 575 if (str != NULL)
577 parse_keysym (opt + sizeof ("keysym.") - 1, str); 576 parse_keysym (opt + sizeof ("keysym.") - 1, str);
673 char *newarg = NULL; 672 char *newarg = NULL;
674 char newargstr[NEWARGLIM]; 673 char newargstr[NEWARGLIM];
675 674
676 if (arg == NULL) 675 if (arg == NULL)
677 { 676 {
678 if ((n = rxvt_Str_match (str, "keysym.")) == 0) 677 n = sizeof ("keysym.") - 1;
678 if (strncmp (str, "keysym.", n))
679 return 0; 679 return 0;
680 680
681 str += n; /* skip `keysym.' */ 681 str += n; /* skip `keysym.' */
682 if (!(pmodend = strchr (str, ':'))) 682 if (!(pmodend = strchr (str, ':')))
683 return -1; 683 return -1;
756 strncpy (newargstr, arg, NEWARGLIM - 1); 756 strncpy (newargstr, arg, NEWARGLIM - 1);
757 newargstr[NEWARGLIM - 1] = '\0'; 757 newargstr[NEWARGLIM - 1] = '\0';
758 newarg = newargstr; 758 newarg = newargstr;
759 } 759 }
760 760
761 rxvt_Str_trim (newarg); 761 if (*newarg == '\0')
762 if (*newarg == '\0' || (n = rxvt_Str_escaped (newarg)) == 0)
763 return -1; 762 return -1;
764 763
765 keyboard->register_user_translation (sym, state, newarg); 764 keyboard->register_user_translation (sym, state, newarg);
766 return 1; 765 return 1;
767} 766}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines