Contents in 1999-06-04-13 of release-21-2.
[chise/xemacs-chise.git.1] / lwlib / xlwmenu.c
index cf4de8d..4b01283 100644 (file)
@@ -423,10 +423,9 @@ string_width_u (XlwMenuWidget mw,
   int i, j;
 
 #ifdef NEED_MOTIF
+  chars = "";
   if (!XmStringGetLtoR (string, XmFONTLIST_DEFAULT_TAG, &chars))
-    {
-      chars = "";
-    }
+    chars = "";
 #else
   chars = string;
 #endif
@@ -483,7 +482,8 @@ massage_resource_name (CONST char *in, char *out)
       char ch = massaged_resource_char[(unsigned char) *in++];
       if (ch)
        {
-         *out++ = firstp ? tolower (ch) : toupper (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;
@@ -871,7 +871,9 @@ string_draw_u (XlwMenuWidget mw,
   char *chars;
 
 #ifdef NEED_MOTIF
-  XmStringGetLtoR (string, XmFONTLIST_DEFAULT_TAG, &chars);
+  chars = "";
+  if (!XmStringGetLtoR (string, XmFONTLIST_DEFAULT_TAG, &chars))
+    chars = "";
 #else
   chars = string;
 #endif
@@ -2823,8 +2825,8 @@ make_shadow_gcs (XlwMenuWidget mw)
   xgcv.foreground = mw->menu.bottom_shadow_color;
 /*  xgcv.stipple = mw->menu.bottom_shadow_pixmap; gtb */
 #ifdef NEED_MOTIF
-  if (mw->menu.top_shadow_pixmap &&
-      mw->menu.top_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
+  if (mw->menu.bottom_shadow_pixmap &&
+      mw->menu.bottom_shadow_pixmap != XmUNSPECIFIED_PIXMAP)
      xgcv.stipple = mw->menu.bottom_shadow_pixmap;
   else
      xgcv.stipple = 0;