XEmacs 21.2.32 "Kastor & Polydeukes".
[chise/xemacs-chise.git.1] / lwlib / xlwmenu.c
index c7ef3b4..23d5a45 100644 (file)
@@ -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;
@@ -2809,30 +2819,22 @@ make_shadow_gcs (XlwMenuWidget mw)
   xgcv.foreground = mw->menu.top_shadow_color;
   xgcv.background = mw->core.background_pixel;
 /*  xgcv.stipple = mw->menu.top_shadow_pixmap; gtb */
-#ifdef NEED_MOTIF
   if (mw->menu.top_shadow_pixmap &&
       mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
      xgcv.stipple = mw->menu.top_shadow_pixmap;
   else
      xgcv.stipple = 0;
-#else
-  xgcv.stipple = mw->menu.top_shadow_pixmap;
-#endif /* NEED_MOTIF */
   pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
   mw->menu.shadow_top_gc =
     XtGetGC((Widget)mw, GCForeground|GCBackground|pm, &xgcv);
 
   xgcv.foreground = mw->menu.bottom_shadow_color;
 /*  xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */
-#ifdef NEED_MOTIF
   if (mw->menu.bottom_shadow_pixmap &&
       mw->menu.bottom_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
      xgcv.stipple = mw->menu.bottom_shadow_pixmap;
   else
      xgcv.stipple = 0;
-#else
-  xgcv.stipple = mw->menu.bottom_shadow_pixmap;
-#endif /* NEED_MOTIF */
   pm = (xgcv.stipple ? GCStipple|GCFillStyle : 0);
   mw->menu.shadow_bottom_gc =
     XtGetGC ((Widget)mw, GCForeground|GCBackground|pm, &xgcv);