X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=lwlib%2Fxlwmenu.c;h=23d5a456d6cdd380b405cecc780cad549c9f010a;hp=a35a629c60f45b7b76bfbc6d5f31d8c2c419f51b;hb=2fd9701a4f902054649dde9143a3f77809afee8f;hpb=efab7bccd7d7da13ff3979d2890a417a048ec960;ds=sidebyside diff --git a/lwlib/xlwmenu.c b/lwlib/xlwmenu.c index a35a629..23d5a45 100644 --- a/lwlib/xlwmenu.c +++ b/lwlib/xlwmenu.c @@ -479,16 +479,26 @@ massage_resource_name (const char *in, char *out) Boolean firstp = True; while (*in) { - char ch = massaged_resource_char[(unsigned char) *in++]; - if (ch) + if (*in == '%' && *(in + 1) == '_') + in += 2; + else { - int int_ch = (int) (unsigned char) ch; - *out++ = firstp ? tolower (int_ch) : toupper (int_ch); - firstp = False; - while ((ch = massaged_resource_char[(unsigned char) *in++]) != '\0') - *out++ = ch; - if (!*(in-1)) /* Overshot the NULL byte? */ - break; + char ch; + + if (*in == '%' && *(in + 1) == '%') + in++; + ch = massaged_resource_char[(unsigned char) *in++]; + if (ch) + { + int int_ch = (int) (unsigned char) ch; + *out++ = firstp ? tolower (int_ch) : toupper (int_ch); + firstp = False; + while ((ch = massaged_resource_char[(unsigned char) *in++]) + != '\0') + *out++ = ch; + if (!*(in-1)) /* Overshot the NULL byte? */ + break; + } } } *out = 0;