]> git.eshelyaron.com Git - emacs.git/commitdiff
Assume C89 offsetof in xterm.c, xlwmenu.c
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Apr 2015 07:58:07 +0000 (00:58 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Apr 2015 07:58:37 +0000 (00:58 -0700)
* lwlib/xlwmenu.c (offset):
* src/xterm.c (cvt_string_to_pixel_args):
Use offsetof, not XtOffset.

lwlib/xlwmenu.c
src/xterm.c

index 9317dea02b0394edb5aba2b8ed8afd5ee2933f24..61f175b3c254de81b72fe665d20fc9c4d2f7de0d 100644 (file)
@@ -105,7 +105,7 @@ xlwMenuTranslations [] =
 
 /* FIXME: F10 should enter the menu, the first one in the menu-bar.  */
 
-#define offset(field) XtOffset(XlwMenuWidget, field)
+#define offset(field) offsetof (XlwMenuRec, field)
 static XtResource
 xlwMenuResources[] =
 {
index e904343387cd38dbace77da873fd3905b52afdaf..48b250b81a3ced7302a7b25faa18dcc5dbd77df2 100644 (file)
@@ -1378,9 +1378,9 @@ x_alloc_lighter_color_for_widget (Widget widget, Display *display, Colormap cmap
 
 static XtConvertArgRec cvt_string_to_pixel_args[] =
   {
-    {XtWidgetBaseOffset, (XtPointer) XtOffset (Widget, core.screen),
+    {XtWidgetBaseOffset, (XtPointer) offsetof (WidgetRec, core.screen),
      sizeof (Screen *)},
-    {XtWidgetBaseOffset, (XtPointer) XtOffset (Widget, core.colormap),
+    {XtWidgetBaseOffset, (XtPointer) offsetof (WidgetRec, core.colormap),
      sizeof (Colormap)}
   };