Commit 96a858a4 authored by Paul Eggert's avatar Paul Eggert Committed by Paul Eggert

Assume C89 offsetof in widget.c

* src/widget.c (XtOffset): Remove; no longer needed.
(offset): Implement via offsetof instead of via pre-C89 XtOffset hack.
parent 7744cc7e
......@@ -61,10 +61,7 @@ static void EmacsFrameResize (Widget widget);
static XtGeometryResult EmacsFrameQueryGeometry (Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *result);
#undef XtOffset
#define XtOffset(p_type,field) \
((Cardinal) (((char *) (&(((p_type)0)->field))) - ((char *)0)))
#define offset(field) XtOffset (EmacsFrame, emacs_frame.field)
#define offset(field) offsetof (EmacsFrameRec, emacs_frame.field)
static XtResource resources[] = {
{XtNgeometry, XtCGeometry, XtRString, sizeof (String),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment